This WebSetting API defines a set of APIs that manages the setting states of the Web view in your Web application.
A Tizen Web application includes a web view and the properties below of the web view can be managed via the Web setting API:
Delete all the cookies saved for the web view in the Web application.
Set a custom user agent string of the web view in the Web application.
Note that all the settings using the Web setting API is bound to your application; thus, no other applications are affected via the Web setting API calls within your application.
This method allows the user to set the user agent string of the Web view in the Web application. By default, the Web view in your application has the same user agent string as the Tizen browser on the device.
The ErrorCallback is launched with these error types:
UnknownError - If any error occurs while setting the user agent string.
InvalidValuesError - If any of the input parameters contain an invalid value.
Parameters:
userAgent: User agent to set for the Web view in your Web application.
successCallback [optional][nullable]: To be invoked if the requested setting operation succeeds.
errorCallback [optional][nullable]: To be invoked if the requested setting operation fails.
Exceptions:
WebAPIException
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
Code example:
function successCallback() {
console.log("The requested user agent string has just been set successfully.");
}
tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
removeAllCookies
Removes all the cookies saved for the Web view in your Web application.
The Web view in your Web application can store cookies like a browser. This method allows the user to remove all the cookies saved for the Web application.
The ErrorCallback is launched with these error types:
UnknownError - If any error occurs while deleting the cookies.
Warning: http://tizen.org/privilege/websetting(public level privilege) MUST NOT be declared to use this API since 2.4.
Parameters:
successCallback [optional][nullable]: To be invoked if the requested delete operation succeeds.
errorCallback [optional][nullable]: To be invoked if the requested delete operation fails.
Exceptions:
WebAPIException
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
Code example:
function successCallback() {
console.log("The cookies saved for your application have just been removed.");
}
tizen.websetting.removeAllCookies(successCallback);
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.