Web Setting: Managing the Setting States of the Web View
This tutorial demonstrates how you can manage Web view properties.
This feature is supported in mobile applications only.
Warm-up
Become familiar with the Web Setting API basics by learning about:
-
Setting a User Agent for a Running Application
Set a Web view user agent string.
-
Deleting Web View Cookies
Delete Web view cookies.
Setting a User Agent for a Running Application
Learning how to set a user agent string to perform tasks is a basic Web setting management skill:
-
Use the setUserAgentString() method to set a Web view user agent string:
function successCallback() { console.log("The requested user agent string has just been set successfully." + navigator.userAgent); } /* Set a user agent string */ var userAgent = "CUSTOM_USER_AGENT_STRING"; tizen.websetting.setUserAgentString(userAgent, successCallback);
Deleting Web View Cookies
Learning how to delete Web view cookies is a basic Web setting management skill:
-
Use the removeAllCookies() method to delete all the Web view cookies:
function CookiesRemovedSuccessCallback() { console.log("The cookies saved for your application have just been removed."); } tizen.websetting.removeAllCookies(CookiesRemovedSuccessCallback);