Changes

Jump to: navigation, search

NPAPI:ClearSiteData

53 bytes added, 19:34, 19 November 2010
Current Proposal
Should it be part of the API? If so, what format?
= Current Proposal =
* Last modified: Nov 19, 2010* AuthorAuthors: Julian Reschke (greenbytes), Dan Witte <&lt;dwitte@mozilla.com>&gt;, Bernhard Bauer <&lt;bauerb@chromium.org>&gt;, Rajesh Gwalani &lt;rgwalani@adobe.com&gt;
The current proposal is to add a new method, providing the new functionality: <pre>NPError NPP_ClearSiteData(
PRUint64 flags, // what type of data to clear
const char* origin, // limit to origin
PRUInt64 maxAge // max. age of information in seconds
);</pre> New [https://developer.mozilla.org/en/NPAPI/Constants#Error_Codes NPError codes]:<pre>// can't clear by time range
#define NPERR_TIMERANGE_NOT_SUPPORTED (NPERR_BASE + 14)
// can't clear by domain/siteorigin#define NPERR_LIMITBYSITE_NOT_SUPPORTED NPERR_LIMITBYORIGIN_NOT_SUPPORTED (NPERR_BASE + 15)// malformed 'domainorigin' string#define NPERR_MALFORMED_DOMAIN NPERR_MALFORMED_ORIGIN (NPERR_BASE + 16)</pre>Semantics:
Semantics:* <code>flags</code> is a bitset representing which type(s) of data to clear; <code>0</code> means "clear all types".* The <code>domain</code> argument is interpreted as follows:** if a hostname of the form "foo.com", data in the "foo.com" domain and all subdomains should be cleared. In this form, <code>domain</code> must be a normalized ACE-encoded hostname, lowercased; must not contain a trailing dot; must not contain scheme, port, or other such fields; and must contain at least one embedded dot;** if an IP address (either IPv4 or IPv6), data for that IP should be cleared;** if <code>NULL</code>, all site-specific data and more generic data on browsing history (for instance, number of sites visited) should be cleared.* <code>maxAge</code> is the maximum age of data to clear, inclusive, in seconds. If <code>maxAge</code> is <code>0</code>, no data is cleared. If <code>maxAge</code> is the maximum unsigned 64-bit integer, all data is cleared.
= Open Issues =
2
edits

Navigation menu