WebStorage

Since: BlackBerry 10.0.0

#include <bb/cascades/WebStorage>

Utilities for accessing the storage for a WebView control.

Each WebView instance has an associated WebStorage which can be referenced by reading the WebView storage property. You should never have any reason to create an instance of this class yourself.

Note: Some storage is process wide and not tied an individual WebView. For example, clearing cookies on one WebView will clear the cookies for all other WebViews running inside the same process.


Overview

Properties Index

Public Functions Index

Properties

bb::cascades::WebCookieJar cookieJar[read-only]

A jar (database) containing web cookies.

Since:

BlackBerry 10.0.0

Public Functions

bb::cascades::WebCookieJar * cookieJar ()

Returns the cookie jar.

See also:

WebCookieJar.

Since:

BlackBerry 10.0.0

Public Slots

void clear ()

Clears all data stored by this WebView.

void clearAutofillData ()

Clears the form AutoFill data accumulated in this WebView.

Since:

BlackBerry 10.0.0

void clearCache ()

Clears the cache accumulated by this WebView.

Also clears the cached site exceptions. Note that before BlackBerry 10 OS version 10.2.1, it was not possible for the user to add site exceptions, loading over untrusted connections was not allowed at all.

Since:

BlackBerry 10.0.0

void clearCookies ()

Clears the cookie database stored for this WebView.

Since:

BlackBerry 10.0.0

void clearCredentials ()

Clears the login credentials accumulated in this WebView.

Since:

BlackBerry 10.0.0

void clearDatabases ()

Clears any databases kept by this WebView.

Since:

BlackBerry 10.0.0

void clearGeolocationPermissions ()

Clears all geolocation permissions granted by the user to web sites that make use of location services.

Content loaded in WebView can make use of location services. Please note that you must set the "access_location_services" permission in your bar-descriptor.xml file in order to use this functionality, and the user must enable device-wide "Location Services" in the Settings application. In addition, the user will be prompted whether to allow use of location services on a site by site basis. The permissions are persisted, but can be cleared by calling this method.

Call this method to clear all geolocation permissions.

Starting with BlackBerry 10.3, calling clear() also clears all geolocation permissions. In previous versions of BlackBerry 10 OS, geolocation permissions were not persisted, so there was nothing to clear.

Since:

BlackBerry 10.3.0

void clearLocalStorage ()

Clears the local storage for this WebView.

Since:

BlackBerry 10.0.0

void clearSslSiteExceptions ()

Clears all site exceptions added by the user when encountering untrusted HTTPS/SSL connections.

If an untrusted connection is encountered while loading a web page, for example due to an expired SSL certificate, the user is given the option to add a "site exception" and continue loading anyway. Until that site exception is removed, that particular web page will load without warning.

Call this method to clear all site exceptions.

Note that while this API is introduced to QML in bb.cascades version 1.3, it's possible to clear all site exceptions (among other things cleared) in earlier versions of the Cascades framework by calling clear() or clearCache(). Note that before BlackBerry 10 OS version 10.2.1, it was not possible for the user to add site exceptions, loading over untrusted connections was not allowed at all. If your QML code targets both versions newer and older than bb.cascades 1.3, it makes sense to call clear() or clearCache() instead of clearSslSiteExceptions() in order to be able to deploy the same QML to all devices.

Since:

BlackBerry 10.3.0

void clearWebFileSystem ()

Clears the web file system for this WebView.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-29



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus