Search completed in 1.11 seconds.
500 results for "storage":
Your results are loading. Please wait...
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the browser for the current site or app.
... the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
... syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
... specifications specification status comment storagethe definition of 'navigator.storage' in that specification.
Local Storage / Session Storage - Firefox Developer Tools
when an origin corresponding to local storage or session storage is selected within the storage inspector, the names and values of all the items corresponding to local storage or session storage will be listed in a table.
... you can edit local and session storage items by double-clicking inside cells in the table widget and editing the values they contain: you can delete local storage and session storage entries using the context menu: you can also delete local and session storage entries by selecting an item and pressing the delete or backspace key.
... finally, you can add new storage items by clicking the "plus" (+) button and then editing the resulting new row to the value you want.
Storage
storage is a sqlite database api.
... note: storage is not the same as the dom:storage feature which can be used by web pages to store persistent data or the session store api (an xpcom storage utility for use by extensions).
... getting started this document covers the storage api and some peculiarities of sqlite.
...And 50 more matches
Storage access policy: Block cookies from trackers
firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources.
...consider the following examples: hostname on the list hostname of resource matched example.com example.com yes example.com a.b.example.com yes blah.example.com example.com no a.b.example.com c.d.example.com no blah.example.com foo.blah.example.com yes what does the storage access policy block?
... the storage access policy blocks resources identified as trackers from accessing their cookies and other site storage when they are loaded in a third-party context.
...And 47 more matches
Client-side storage - Learn web development
this lets you persist data for long-term storage, save sites or documents for offline use, retain user-specific settings for your site, and more.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data.
... client-side storage?
...And 42 more matches
mozIStorageConnection
storage/public/mozistorageconnection.idlscriptable this interface represents a database connection attached to a specific file or an in-memory database.
... 1.0 68 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for a general overview on how to use this interface, see storage.
... method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype); mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunction(in autf8string afunctionname, in long anumarguments, in mozistoragefunction afunction); mozistoragestatement createstatement(in autf8string asqlstatement); void createtable(in string atablename, in string atab...
...And 37 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can securely store key/value pairs.
... basic concepts storage objects are simple key-value stores, similar to objects, but they stay intact through page loads.
...you can access these values like an object, or with the storage.getitem() and storage.setitem() methods.
...And 33 more matches
Storage Access API - Web APIs
the storage access api provides a way for embedded, cross-origin content to gain unrestricted access to storage that it would normally only have access to in a first-party context (we refer to this as an origin’s first-party storage).
... the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent.
... concepts and usage most browsers implement a number of storage access policies that restrict access to cookies and site data for embedded, cross-origin resources.
...And 30 more matches
mozIStorageStatement
storage/public/mozistoragestatement.idlscriptable this interface lets you create and execute sql statements on a mozistorageconnection.
... inherits from: mozistoragevaluearray last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) for an introduction on how to use this interface, see the storage overview document.
... method overview void initialize(in mozistorageconnection adbconnection, in autf8string asqlstatement); obsolete since gecko 1.9.1 void finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void reset(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bindparameters(in mozistoragebindingparamsarray aparameters); mozistoragebindingparamsarray newbindingparamsarray(); void bindutf8stringparameter(in unsigned long aparamindex, in autf8string avalue); ...
...And 25 more matches
Document.requestStorageAccess() - Web APIs
the requeststorageaccess() method of the document interface returns a promise that resolves if the access to first-party storage was granted, and rejects if access was denied.
... conditions for granting storage access storage access is granted based on a series of checks described here: if the document already has been granted access, resolve.
... if the sub frame doesn't have the token allow-storage-access-by-user-activation, reject.
...And 25 more matches
Browser storage limits and eviction criteria - Web APIs
the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers.
... this article describes how browsers determine what local content to purge and when in order to free up needed local storage space.
... what technologies use browser data storage?
...And 21 more matches
simple-storage - Archive of obsolete content
this module works similarly to dom storage on the web, except that it's only available for add-ons.
... usage the simple storage module exports an object called storage that is persistent and scoped to your add-on.
... to store a value, just assign it to a property on storage: var ss = require("sdk/simple-storage"); ss.storage.myarray = [1, 1, 2, 3, 5, 8, 13]; ss.storage.myboolean = true; ss.storage.mynull = null; ss.storage.mynumber = 3.1337; ss.storage.myobject = { a: "foo", b: { c: true }, d: null }; ss.storage.mystring = "o frabjous day!"; you can store array, boolean, number, object, null, and string values.
...And 20 more matches
Storage API - Web APIs
the storage standard defines a common, shared storage system to be used by all apis and technologies that store content-accessible data for individual web sites.
... the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
... site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
...And 17 more matches
mozIStorageService
storage/public/mozistorageservice.idlscriptable this interface lets you open a mozistorageconnection to a database file, as well as create backups of an unopened database file.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see mozistorageconnection method overview nsifile backupdatabasefile(in nsifile adbfile, in astring abackupfilename, [optional] in nsifile abackupparentdirectory); mozistorageconnection opendatabase(in nsifile adatabasefile); mozistorageconnection openspecialdatabase(in string astoragekey); mozistorageconnection openunshareddatabase(in nsifile adatabasefile); methods backupdatabasefile() this method makes a backup of the specified file.
...if this method throws ns_error_file_corrupted, it's recommended that you call mozistorageservice.backupdatabasefile() to back up the database so that user data is not lost (although we have no way of recovering this data yet).
...And 16 more matches
Storage Inspector - Firefox Developer Tools
the storage inspector enables you to inspect various types of storage that a web page can use.
... currently it can be used to inspect the following storage types: cache storage — any dom caches created using the cache api.
... local storage — all local storage items created by the page or any iframes inside the page.
...And 16 more matches
CacheStorage - Web APIs
the cachestorage interface represents the storage for cache objects.
... note: chrome and safari only expose `cachestorage` to the windowed context over https.
... use cachestorage.open() to obtain a cache instance.
...And 14 more matches
mozIStorageFunction
objects implementing this interface can be registered with mozistorageconnection.createfunction().
... storage/public/mozistoragefunction.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1.4 (firefox 3.5.4) inherits from: nsisupports method overview nsivariant onfunctioncall(in mozistoragevaluearray afunctionarguments); methods onfunctioncall() the implementation of the function.
...And 13 more matches
Storage - Web APIs
WebAPIStorage
the storage interface of the web storage api provides access to a particular domain's session or local storage.
... to manipulate, for instance, the session storage for a domain, a call to window.sessionstorage is made; whereas for local storage the call is made to window.localstorage.
... properties storage.length read only returns an integer representing the number of data items stored in the storage object.
...And 12 more matches
Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
... web storage concepts and usage the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores) stores data only for a session, meaning that the data is stored until the browser (or tab) is closed.
... storage limit is larger than a cookie (at most 5mb).
...And 11 more matches
Simple Storage - Archive of obsolete content
the jetpack.storage.simple namespace provides an easy way to persist data across browser restarts.
...simple storage is really simple.
... jetpack.storage.simple is a single, persistent javascript object private to each jetpack.
...And 10 more matches
mozIStorageAggregateFunction
objects implementing this interface can be registered with mozistorageconnection.createaggregatefunction().
... storage/public/mozistorageaggregatefunction.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onstep(in mozistoragevaluearray afunctionarguments); nsivariant onfinal(); methods onstep() this is called for each row of results returned by the query.
...And 10 more matches
Simple Storage - Archive of obsolete content
the jetpack.storage.simple namespace provides an easy way to persist data across browser restarts.
...simple storage is really simple.
... jetpack.storage.simple is a single, persistent javascript object private to each jetpack.
...And 9 more matches
Using the Storage Access API - Web APIs
the storage access api should be used by embedded cross-origin documents to verify whether they have access to their first-party storage and, if not, to request access.
... we’ll briefly look at a common storage access scenario.
... usage notes the storage access api is designed to allow embedded content to request access to storage that would otherwise be blocked when a user’s browser is set to block all third-party cookies.
...And 8 more matches
Window.sessionStorage - Web APIs
the read-only sessionstorage property accesses a session storage object for the current origin.
... sessionstorage is similar to localstorage; the difference is that while data in localstorage doesn't expire, data in sessionstorage is cleared when the page session ends.
... opening multiple tabs/windows with the same url creates sessionstorage for each tab/window.
...And 8 more matches
nsIDOMStorage
dom/interfaces/storage/nsidomstorage.idlscriptable this interface represents the storage space used for session storage in the dom.
... items stored in session storage may be accessed by any interested party in the same browsing context.
... 1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) a dom window's session storage object can be retrieved from the window's sessionstorage attribute.
...And 7 more matches
StorageEvent - Web APIs
a storageevent is sent to a window when a storage area it has access to is changed within the context of another document.
...75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initsto...
...rageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
...And 7 more matches
Local Storage - Archive of obsolete content
« previousnext » note: you may rather be looking for dom storage (localstorage, etc.), unless you really are doing xul development.
... it is very common for an extension to require some kind of local persistent storage.
... sqlite sqlite storage was introduced in firefox 2, and it's the preferred storage mechanism in firefox.
...And 6 more matches
mozIStorageProgressHandler
the mozistorageprogresshandler interface lets storage consumers receive callbacks during the execution of sqlite requests.
... storage/public/mozistorageprogresshandler.idlscriptable please add a summary to this article.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing.
...And 6 more matches
mozIStorageStatementWrapper
the mozistoragestatementwrapper interface is a storage statement wrapper.
... when you call the mozistorageconnection interface's createstatement() method, you get a mozistoragestatement which has just direct bindings to sqlite.
... firefox 3.5 note firefox 3.5 adds support for these features directly into the mozistoragestatement interface, so this interface is essentially deprecated.
...And 6 more matches
mozIStorageValueArray
the mozistoragevaluearray interface obtains provides methods to obtain data from a given result.
... for an introduction on how to use this interface, see the storage overview document.
... storage/public/mozistoragevaluearray.idlscriptable please add a summary to this article.
...And 6 more matches
nsIDOMStorage2
the nsidomstorage2 interface represents the storage space used for local storage in the dom.
... items stored in local storage may only be accessed by the same origin that created the items in the first place.
... a dom window's local storage object can be retrieved from the window's localstorage attribute.
...And 6 more matches
nsIDOMStorageEventObsolete
dom/interfaces/storage/nsidomstorageeventobsolete.idlscriptable this interface represents an event that occurs to notify interested parties about changes to the contents of a dom storage space; it is used for both session storage and local storage.
... 1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsidomevent last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed.
... if the value of the domain attribute is "#session", then the session storage has changed.
...And 6 more matches
mozIStorageBindingParamsArray
the mozistoragebindingparamsarray interface is a container for mozistoragebindingparams objects, and is used to store sets of bound parameters that will be used by the mozistoragestatement.executeasync().
... storage/public/mozistoragebindingparamsarray.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray().
...And 5 more matches
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...getlocalstorageforprincipal() returns the instance of the localstorage object for auri's origin.
...And 5 more matches
StorageManager.estimate() - Web APIs
the estimate() method of the storagemanager interface asks the storage manager for how much storage the current origin takes up (usage), and how much space is available (quota).
...the promise's fulfillment handler is called with a storageestimate containing the usage and quota data.
... syntax const estimatepromise = storagemanager.estimate(); parameters none.
...And 5 more matches
Window.localStorage - Web APIs
the read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across browser sessions.
... localstorage is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
...And 5 more matches
Creating a Login Manager storage module
extensions can replace the built-in password storage with their own implementation.
... this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database.
... overriding the built-in login manager storage consists of two tasks: implement the nsiloginmanagerstorage interface.
...And 4 more matches
Document.hasStorageAccess() - Web APIs
the hasstorageaccess() method of the document interface returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage.
... see storage access api for more information.
... syntax var promise = document.hasstorageaccess(); parameters none.
...And 4 more matches
Storage.removeItem() - Web APIs
the removeitem() method of the storage interface, when passed a key name, will remove that key from the given storage object if it exists.
... the storage interface of the web storage api provides access to a particular domain's session or local storage.
... syntax storage.removeitem(keyname); parameters keyname a domstring containing the name of the key you want to remove.
...And 4 more matches
Storage.setItem() - Web APIs
WebAPIStoragesetItem
the setitem() method of the storage interface, when passed a key name and value, will add that key to the given storage object, or update that key's value if it already exists.
... syntax storage.setitem(keyname, keyvalue); parameters keyname a domstring containing the name of the key you want to create/update.
... exceptions setitem() may throw an exception if the storage is full.
...And 4 more matches
StorageEstimate - Web APIs
the storageestimate dictionary is used by the storagemanager to provide estimates of the size of a site's or application's data store and how much of it is in use.
... these values are only estimates for several reasons, including both performance and preventing storage capacity data from being used for fingerprinting purposes.
... properties quota secure context a numeric value in bytes which provides a conservative approximation of the total storage the user's device or computer has available for the site origin or web app.
...And 4 more matches
extISessionStorage
this content covers features introduced in thunderbird 3 extisessionstorage allows an extension to store data for the life time of the application (e.g.
...extisessionstorage is defined in toolkit/components/exthelper/extiapplication.idl.
... method overview these methods are usually accessed via application.storage.
...And 3 more matches
mozIStorageResultSet
the mozistorageresultset interface represents a set of results from a storage statement.
... storage/public/mozistorageresultset.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set.
...And 3 more matches
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries.
... storage/public/mozistoragestatementcallback.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void handlecompletion(in unsigned short areason); void handleerror(in mozistorageerror aerror); void handleresult(in mozistorageresultset aresultset); constants constant value description reason_finished 0 the statement has finished executing normally.
...And 3 more matches
nsIDOMStorageWindow
dom/interfaces/storage/nsidomstoragewindow.idlscriptable this interface provides access to a dom window's client side storage objects.
... attributes attribute type description globalstorage nsidomstoragelist global storage, accessible by domain.
... localstorage nsidomstorage local storage for the current browsing context.
...And 3 more matches
nsILoginManagerStorage
toolkit/components/passwordmgr/public/nsiloginmanagerstorage.idlscriptable this interface is implemented by modules that wish to provide storage mechanisms for the login manager.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for example, if you wish to provide operating system integration with a native password manager system, implementing and registering a storage module for the login manager is how you do it.
... see creating a login manager storage module for details.
...And 3 more matches
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
the keys() method of the cachestorage interface returns a promise that will resolve with an array containing strings corresponding to all of the named cache objects tracked by the cachestorage object in the order they were created.
... you can access cachestorage through the global caches property.
... return value a promise that resolves with an array of the cache names inside the cachestorage object.
...And 3 more matches
NavigatorStorage - Web APIs
the navigatorstorage mixin adds to the navigator and workernavigator interfaces the navigator.storage property, which provides access to the storagemanager singleton used for controlling the persistence of data stores as well as obtaining information note: this feature is available in web workers.
... there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
... the storage standard is designed to serve as a common basis for the implementation of all of those apis and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties.
...And 3 more matches
StorageEstimate.usage - Web APIs
the storageestimate dictionary's usage property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
... the value is an estimate because the user agent may use compression, duplication prevention techniques, and other methods to improve storage efficiency.
... syntax usage = storageestimate.usage; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
...And 3 more matches
StorageManager - Web APIs
the storagemanager interface of the the storage api provides an interface for managing persistance permissions and estimating available storage.
... you can get a reference to this interface using either navigator.storage or workernavigator.storage.
... methods storagemanager.estimate() secure context returns a promise that resolves to a storageestimate object containing usage and quota numbers for your origin.
...And 3 more matches
StorageQuota - Web APIs
the storagequota property of the navigator interface of the quota management api provides means to query and request storage usage and quota information.
... you can get a reference to this interface using navigator.storagequota.
... properties storagequota.supportedtypes read only returns a list of the available storage types.
...And 3 more matches
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.
... syntax void gl.renderbufferstoragemultisample(target, samples, internalformat, width, height); parameters target a glenum specifying the target renderbuffer object.
... possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
...And 3 more matches
WebGLRenderingContext.renderbufferStorage() - Web APIs
the webglrenderingcontext.renderbufferstorage() method of the webgl api creates and initializes a renderbuffer object's data store.
... syntax void gl.renderbufferstorage(target, internalformat, width, height); parameters target a glenum specifying the target renderbuffer object.
... possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
...And 3 more matches
WindowEventHandlers.onstorage - Web APIs
the onstorage property of the windoweventhandlers mixin is an eventhandler for processing storage events.
... the storage event fires when a storage area has been changed in the context of another document.
... syntax window.onstorage = functionref; value functionref is a function name or a function expression.
...And 3 more matches
nsIDOMStorageItem
dom/interfaces/storage/nsidomstorageitem.idlscriptable this interface represents an object in dom storage.
... this is for session storage.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) gecko 1.9.1 note starting in gecko 1.9.1 (firefox 3.5), this is only used for session storage; previously, it was also used for global storage.
...And 2 more matches
Storage.clear() - Web APIs
WebAPIStorageclear
the clear() method of the storage interface clears all keys stored in a given storage object.
... syntax storage.clear(); return value undefined.
... examples the following function creates three data entries in local storage, and then deletes them by using clear().
...And 2 more matches
Storage.getItem() - Web APIs
WebAPIStoragegetItem
the getitem() method of the storage interface, when passed a key name, will return that key's value, or null if the key does not exist, in the given storage object.
... syntax var avalue = storage.getitem(keyname); parameters keyname a domstring containing the name of the key you want to retrieve the value of.
... example the following function retrieves three data items from local storage, then uses them to set custom styles on a page.
...And 2 more matches
StorageEstimate.quota - Web APIs
the storageestimate dictionary's quota property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
... syntax quota = storageestimate.quota; value a numeric value specifying an approximation of the total amount of storage space available for use by the application.
... example in this example, we obtain the usage estimates and present the percentage of storage capacity currently used to the user.
...And 2 more matches
mozIStorageAsyncStatement
this differs from mozistoragestatement by only being usable for asynchronous execution.
... (mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
... inherited interface mozistoragebasestatement ...
mozIStorageRow
the mozistoragerow interface represents a row in the result set from a storage database query.
... storage/public/mozistoragerow.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: mozistoragevaluearray method overview nsivariant getresultbyindex(in unsigned long aindex); nsivariant getresultbyname(in autf8string aname); methods getresultbyindex() returns the value from a specific column in the row, using a zero-based index to identify the column.
...see also storage mozistorageresultset mozistorageconnection mozistoragestatement ...
nsIDOMStorageList
dom/interfaces/storage/nsidomstoragelist.idlscriptable this interface is used to access the contextual storage areas used by globalstorage by domain.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes.
... nsidomstorage nameditem( in domstring domain ); parameters domain the name of the domain for whom to return the storage object.
... return value the nsidomstorage object representing the data store for the specified domain.see also dom storage structured client-side storage (html 5 specification) nsidomwindow ...
CacheStorage.delete() - Web APIs
the delete() method of the cachestorage interface finds the cache object matching the cachename, and if found, deletes the cache object and returns a promise that resolves to true.
... you can access cachestorage through the global caches property.
...we return the keys of the caches in the cachestorage object using cachestorage.keys, then check each key to see if it is in the array.
...ate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: delete' in that specification.
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
the has() method of the cachestorage interface returns a promise that resolves to true if a cache object matches the cachename.
... you can access cachestorage through the global caches property.
...}); parameters cachename a domstring representing the name of the cache object you are looking for in the cachestorage.
...}); specifications specification status comment service workersthe definition of 'cachestorage: has' in that specification.
CacheStorage.match() - Web APIs
the match() method of the cachestorage interface checks if a given request or url string is a key for a stored response.
... you can access cachestorage through the global caches property.
...we construct a custom response like so: check whether a match for the request is found in the cachestorage using cachestorage.match().
...seclone = response.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); specifications specification status comment service workersthe definition of 'cachestorage: match' in that specification.
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
the open() method of the cachestorage interface returns a promise that resolves to the cache object matching the cachename.
... you can access cachestorage through the global caches property.
...this consists of calling cachestorage.open() to create a new cache, then using cache.addall() to add a series of assets to it.
..., '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); specifications specification status comment service workersthe definition of 'cachestorage: open' in that specification.
Storage.key() - Web APIs
WebAPIStoragekey
the key() method of the storage interface, when passed a number n, returns the name of the nth key in a given storage object.
... syntax var akeyname = storage.key(index); parameters index an integer representing the number of the key you want to get the name of.
... examples the following function iterates over the local storage keys: function foreachkey(callback) { for (var i = 0; i < localstorage.length; i++) { callback(localstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage demo.
... specifications specification status comment html living standardthe definition of 'storage.key' in that specification.
Storage.length - Web APIs
WebAPIStoragelength
the length read-only property of the storage interface returns the number of data items stored in a given storage object.
... syntax length = storage.length; return value the number of items stored in the storage object.
... example the following function adds three data items to the local storage for the current domain, then returns the number of items in the storage: function populatestorage() { localstorage.setitem('bgcolor', 'yellow'); localstorage.setitem('font', 'helvetica'); localstorage.setitem('image', 'cats.png'); return localstorage.length; // should return 3 } note: for a real world example, see our web storage demo.
... specifications specification status comment html living standardthe definition of 'storage.length' in that specification.
WebGL2RenderingContext.texStorage2D() - Web APIs
the webgl2renderingcontext.texstorage2d() method of the webgl api specifies all levels of two-dimensional texture storage.
... syntax void gl.texstorage2d(target, levels, internalformat, width, height); parameters target a glenum specifying the binding point (target) of the active texture.
... examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification.
... opengl es 3.0the definition of 'gltexstorage2d' in that specification.
WebGL2RenderingContext.texStorage3D() - Web APIs
the webgl2renderingcontext.texstorage3d() method of the webgl api specifies all levels of a three-dimensional texture or two-dimensional array texture.
... syntax void gl.texstorage3d(target, levels, internalformat, width, height, depth); parameters target a glenum specifying the binding point (target) of the active texture.
... examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification.
... opengl es 3.0the definition of 'gltexstorage3d' in that specification.
Window: storage event - Web APIs
the storage event of the window interface fires when a storage area (localstorage) has been modified in the context of another document.
... bubbles no cancelable no interface storageevent event handler property onstorage examples log the samplelist item to the console when the storage event fires: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }; specifications specification status html living standardthe definition of 'storage' in that specification.
mozIStorageBindingParams
the mozistoragebindingparams interface is used to bind values to parameters prior to calling mozistoragestatement.executeasync().
... storage/public/mozistoragebindingparams.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create mozistoragebindingparams objects by calling the mozistoragebindingparamsarray.newbindingparams().
mozIStorageCompletionCallback
this interface should be implemented to handle callbacks from asynchronous storage api routines.
... storage/public/mozistoragecompletioncallback.idlscriptable please add a summary to this article.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview void complete(); methods complete() called when an asynchronous storage routine has completed.
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement.
... storage/public/mozistoragependingstatement.idlscriptable please add a summary to this article.
...see also storage mozistorageconnection mozistoragestatement ...
mozIStorageVacuumParticipant
/storage/public/mozistoragevacuumparticipant.idlscriptable components can implement this interface to provide information to allow a database to be periodically vacuumed by the storage service.
...method overview boolean onbeginvacuum(); void onendvacuum(in boolean asucceeded); attributes attribute type description databaseconnection mozistorageconnection a connection to the database file to be vacuumed.
...the recommended value is mozistorageconnection::default_page_size.
Extension Storage - Firefox Developer Tools
this storage type is only shown when debugging extensions.
... when selecting an extension id in the storage tree of the storage inspector, a table lists the details of all the extension storage present for the extension.
... storage area — the name of the area where the item is stored.
StorageManager.persist() - Web APIs
the persist() method of the storagemanager interface requests permission to use persistent storage, and returns a promise that resolves to true if permission is granted and box mode is persistent, and false otherwise.
... syntax navigator.storage.persist().then(function(persistent) { ...
... example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification.
StorageManager.persisted() - Web APIs
the persisted() method of the storagemanager interface returns a promise that resolves to true if box mode is persistent for your site's storage.
... syntax navigator.storage.persisted().then(function(persistent) { ...
... example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification.
StorageQuota.queryInfo - Web APIs
the queryinfo() property of the storagequota interface returns a storageinfo object containting the current data usage and available quota information for the application.
... syntax storagequota.queryinfo().then(function(storageinfo) { ...
... returns a reference to a storageinfo object.
StorageQuota.requestPersistentQuota - Web APIs
the requestpersistentquota() property of the storagequota interface requests persistent storage for the requesting application and returns a promise to an instance of storageinfo.
... syntax storagequota.requestpersistentquota().then(function(storageinfo) { ...
... returns a reference to a storageinfo object.
Blocked: All storage access requests
message firefox: cookieblockedall=request to access cookies or storage on “x” was blocked because we are blocking all storage access requests.
... a request to access cookies or storage was blocked because the browser is blocking all storage access.
Blocked: All third-party storage access requests
message firefox: cookieblockedforeign=request to access cookies or storage on “x” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.
... a request to access cookies or storage was blocked because it came from a third-party (a different origin) and content blocking is enabled.
Blocked: Storage access requests from trackers
message firefox: cookieblockedtracker=request to access cookies or storage on “x” was blocked because it came from a tracker and content blocking is enabled.
... a request to access cookies or storage was blocked because the browser identified it as coming from a tracker and content blocking is enabled.
Partitioned: All third-party storage access requests
message firefox: cookiepartitionedforeign=partitioned cookie or storage access was provided to “<url>” because it is loaded in the third-party context and storage partitioning is enabled.
... a request to access cookies or storage was partitioned because it came from a third-party (a different origin) and dynamic first-party isolation is enabled.
mozIStorageError
the mozistorageerror interface represents errors returned by the storage api, offering attributes to obtain the error code as well as a human-readable error message corresponding to the error that occurred.
... storage/public/mozistorageerror.idlscriptable please add a summary to this article.
nsICookieStorage
this interface represents the storage repository for cookies.
... modules/plugin/base/public/nsicookiestorage.idlnot scriptable please add a summary to this article.
StorageQuota.supportedTypes - Web APIs
the supportedtypes read-only property of the storagequota interface returns a list of the available storage types.
... syntax var storagetypes = storagequota.supportedtypes value a frozen array of available storage types.
507 Insufficient Storage - HTTP
WebHTTPStatus507
the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918).
... status 507 insufficient storage specifications specification title rfc 4918, section 11.5: 507 insufficient storage web distributed authoring and versioning ...
Storage - Archive of obsolete content
simple storage an easy-to-use persistent object data store file access interface for performing file i/o settings settings persist across browser sessions and are accessible to jetpacks via simple object retrieval and assignment.
mozIStorageStatementRow
for example, say you create a statement like so: var statement = dbconn.createstatement("select id, name from table_name"); the object would have two properties, id and name, that can be used to get the value of the column after you have called mozistoragestatement.executestep() like so: while (statement.executestep()) { let id = statement.row.id; let name = statement.row.name; } see also storage mozistoragestatement ...
Cache Storage - Firefox Developer Tools
under the cache storage type within the storage inspector you can see the contents of any dom caches created using the cache api.
Index - Web APIs
WebAPIIndex
502 cache api, cache, cache api, experimental, interface, offline, reference, service workers, service worker api, storage the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle.
... 510 cachestorage api, cachestorage, experimental, interface, reference, service workers, serviceworker the cachestorage interface represents the storage for cache objects.
... 511 cachestorage.delete() api, cachestorage, experimental, method, reference, service workers, serviceworker, delete the delete() method of the cachestorage interface finds the cache object matching the cachename, and if found, deletes the cache object and returns a promise that resolves to true.
...And 149 more matches
Index
MozillaTechXPCOMIndex
74 storage guide, interfaces, storage, toolkit api storage is a sqlite database api.
... 75 performance storage, toolkit api mozstorage uses sqlite as the database backend.
... 76 warnings storage, warnings storage sometimes warns about things to stderr.
...And 44 more matches
HTTP Cache
nsicachestorageservice the http cache entry-point.
... //github.com/realityripple/uxp/blob/master/netwerk/cache2/nsicachestorageservice.idl "@mozilla.org/netwerk/cache-storage-service;1" provides methods accessing “storage” objects – see nsicachestorage below – giving further access to cache entries – see nsicacheentry more below – per specific url.
... currently we have 3 types of storages, all the access methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
...And 21 more matches
Introduction to the File and Directory Entries API - Web APIs
usefulness of the api the file and directory entries api is an important api for the following reasons: it lets apps have offline and storage features that involve large binary blobs.
... it provides a storage api that is already familiar to your users, who are used to working with file systems.
... the file and directory entries api and other storage apis the file and directory entries api is an alternative to other storage apis like indexeddb, websql (which has been deprecated since november18, 2010), and appcache.
...And 17 more matches
Working with Svelte stores - Learn web development
we will also see how to develop our own custom store to persist the todo information to web storage, allowing our todos to persist over page reloads.
...we could implement some code in our app.svelte component to read and save our todos to web storage or to a web service.
...we could create a store that syncs its content to web storage, and later develop another one that syncs against a web service.
...And 16 more matches
LocalFileSystem - Web APIs
creating new storage you request access to a sandboxed file system by calling window.requestfilesystem().
...(to learn more about the storage types, see the basic concepts article.) in most cases, you need to create only one file system, but in a few cases, it might be useful to create a second one.
... for example, if you were to create a mail app, you might create a temporary storage for caching assets (like images and attachments) to speed up performance, while creating persistent storage for unique data—such as drafts of emails that were composed while offline—that should not be lost before they are backed up into the cloud.
...And 14 more matches
nsIDocShell
method overview void addsessionstorage(in nsiprincipal principal, in nsidomstorage storage); void addstate(in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditor...
...obsolete since gecko 1.8 nsisimpleenumerator getdocshellenumerator(in long aitemtype, in long adirection); nsidomstorage getsessionstorageforprincipal(in nsiprincipal principal, in domstring documenturi, in boolean create); nsidomstorage getsessionstorageforuri(in nsiuri uri, in domstring documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinpu...
... kcharsetfrompreviousloading methods addsessionstorage() add a webapps session storage object to the docshell.
...And 12 more matches
Index - Archive of obsolete content
59 simple-storage add-on sdk, add-ons, reference lets an add-on store data so that it's retained across firefox restarts.
... 285 local storage guide, storage, xul no summary!
... 423 download manager improvements in firefox 3 download manager, firefox 3 firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
...And 10 more matches
nsICacheService
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is no longer supported and planned to be removed soon: use nsicachestorageservice instead.
... at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source.
... method overview nsicachesession createsession(in string clientid, in nscachestoragepolicy storagepolicy, in boolean streambased); acstring createtemporaryclientid(in nscachestoragepolicy storagepolicy); obsolete since gecko 1.9.2 void evictentries(in nscachestoragepolicy storagepolicy); void init(); obsolete since gecko 1.8 void shutdown(); obsolete since gecko 1.8 void visitentries(in nsicachevisitor visitor); attributes attribute type description cacheiotarget nsieventtarget the event target for cache i/o operation notifications.
...And 8 more matches
Monitoring downloads - Archive of obsolete content
as a nice bonus, it also demonstrates how to use the storage api to issue sqlite commands on a database.
...; this.dlmgr.addlistener(downloadlogger); // open the database, placing its file in the profile directory this.dbfile = components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsiproperties) .get("profd", components.interfaces.nsifile); this.dbfile.append("downloadlogger.sqlite"); // get access to the storage service and open the database this.storageservice = components.classes["@mozilla.org/storage/service;1"] .getservice(components.interfaces.mozistorageservice); var dbconn = this.storageservice.opendatabase(this.dbfile); // now create the table; if it already exists, this fails, but we don't care!
... note: the mozistorageconnection method close() is being added to firefox 3 alpha 8; in prior versions of firefox, there is no way to explicitly close the database.
...And 7 more matches
Mozilla internal string guide
rom somewhere else) dependent buffers, that is, an underlying buffer that the string class does not own, but that the caller that constructed the string guarantees will outlive the string instance in addition, there is a special string class, ns[c]autostring, that additionally contains an internal 64-unit buffer (intended primarily for use on the stack), leading to a fourth ownership model: storage within an auto string's stack buffer auto strings will prefer reference counting an existing reference-counted buffer over their stack buffer, but will otherwise use their stack buffer for anything that will fit in it.
... nsstring/nscstring: builds on nsastring by guaranteeing a null-terminated storage.
... nsautostring / nsautocstring- derived from nsstring, a string which owns a 64 code unit buffer in the same storage space as the string itself.
...And 6 more matches
nsICache
store_anywhere 0 the storage policy of a cache entry determines the device(s) to which it belongs.
...the cache service decides which cache device to use based on "some resource management calculation." store_in_memory 1 the storage policy of a cache entry determines the device(s) to which it belongs.
...requires the cache entry to reside in non-persistent storage.
...And 6 more matches
nsIDOMWindow
in gecko 8.0 nsidomstoragewindow and nsidomwindowinternal have been merged into this interface.
... globalstorage nsidomstoragelist global storage, accessible by domain.
...note: prior to gecko 8.0 this attribute was part of nsidomstoragewindow.
...And 6 more matches
Storing annotations - Archive of obsolete content
now we are able to create annotations, let's store them using the simple-storage module.
... in this chapter we will cover three topics relating to persistent storage: using simple-storage to persist objects handling exhaustion of the storage quota allocated to you respecting private browsing storing new annotations in this section we are only touching the main.js file.
... first, import the simple-storage module with a declaration like: var simplestorage = require('sdk/simple-storage'); in the module scope, initialize an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation.
...And 5 more matches
WebIDL bindings
they also expose setters that set the union as being of a particular type and return a reference to the union's internal storage where that type could be stored.
... maplike example interface: interface stringtolongmap { maplike<domstring, long>; }; the bindings for this interface will generate the storage structure for the map, as well as helper functions for accessing that structure from c++.
...& arv); bool has(mozilla::dom::stringtolongmap* self, const nsastring& akey, errorresult& arv); void set(mozilla::dom::stringtolongmap* self, const nsastring& akey, int32_t avalue, errorresult& arv); } // namespace maplikehelpers } // namespace stringtolongmapbindings setlike example interface: interface stringset { setlike<domstring>; }; the bindings for this interface will generate the storage structure for the set, as well as helper functions for accessing that structure from c++.
...And 5 more matches
Window - Web APIs
WebAPIWindow
window.localstorage read only returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
... window.sessionstorage returns a reference to the session storage object used to store data that may only be accessed by the origin that created it.
... properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
...And 5 more matches
Code snippets - Archive of obsolete content
mainwindow.gbrowser.addtab(url); } } partially corrupt a server components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); function deletepath(path) { let resource = new resource(weave.service.storageurl + path); resource.setheader("x-confirm-delete", "1"); return resource.delete(); } // delete meta/global: deletepath("meta/global"); // delete keys: deletepath("crypto/keys"); // delete server: deletepath(""); corrupt a single engine on the server let engine = "bookmarks"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/reso...
...urce.js"); components.utils.import("resource://services-sync/util.js"); let r = new resource(weave.service.storageurl + "meta/global"); let g = r.get(); let envelope = json.parse(g); let payload = json.parse(envelope.payload); payload.engines[engine].syncid = weave.utils.makeguid(); // or any other guid you like.
...erecord(id, "bookmarks"); let len = record.tostring().length; if (len > 1000) { console.log("id: " + id + ", len = " + len + ", " + record.title); } } print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); let ids = json.parse(new resource(weave.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let collection = "passwords"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); json.parse(new resource(weave.service.storageurl + collection).get()).length; dump the...
...And 4 more matches
JavaScript basics - Learn web development
should the user leave the site and return later, we will save the message using the web storage api.
... function setusername() { let myname = prompt('please enter your name.'); localstorage.setitem('name', myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog box, similar to alert().
...next, the code calls on an api localstorage, which allows us to store data in the browser and retrieve it later.
...And 4 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
primitive streams there are streams for several different types of data storage.
... primitive input streams type native class contract id interface how to bind to a data source generic nsstorageinputstream n/a nsiinputstream, nsiseekablestream storagestream.newinputstream(); string (8-bit characters) nsstringstream @mozilla.org/io/string-input-stream;1 nsistringinputstream stream.setdata(data, length); file nsfileinputstream @mozilla.org/network/file-input-stream;1 nsifileinputstream stream.init(file, ioflags, perm, behaviorflags); zip nsjarinputstream n/a nsiinputstream zipreader.getinputstream(zipentry); similarly, each of these implements nsioutputstream.
... primitive output streams type native class contract id interface how to bind to a data target generic nsstoragestream @mozilla.org/storagestream;1 nsistoragestream stream.getoutputstream(); // returns nsioutputstream file nsfileoutputstream @mozilla.org/network/file-output-stream;1 nsifileoutputstream stream.init(file, ioflags, perm, behaviorflags); file nssafefileoutputstream @mozilla.org/network/safe-file-output-stream;1 nsisafefileoutputstream, nsifileoutputstream stream.init(file, ioflags, perm, behaviorflags); channels have streams too any implementation of nsichannel will have an input stream as well, but unless you own the channel, you shouldn't try to read from the input stream...
...And 4 more matches
Observer Notifications
passwordmgr-storage-changed addlogin a login has been added to the login manager's database.
... passwordmgr-storage-changed removelogin a login was removed from the login manager's database.
... passwordmgr-storage-changed modifylogin a login in the login manager's database was modified.
...And 4 more matches
Replace
void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
... void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
...And 4 more matches
Replace
void replace( index_type acutstart, index_type acutlength, const self_type& astring ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
... void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
...And 4 more matches
Index - Firefox Developer Tools
105 storage inspector cookies, dev tools, firefox, guide, indexeddb, local storage, session storage, storage, tools the storage inspector enables you to inspect various types of storage that a web page can use.
... currently it can be used to inspect the following storage types: 106 cache storage cache storage, devtools, firefox, guide, storage, storage inspector, tools, l10n:priority under the cache storage type within the storage inspector you can see the contents of any dom caches created using the cache api.
...for each resource, you'll see: 107 cookies cookies, dev tools, firefox, guide, storage, storage inspector, tools, l10n:priority when you select an origin inside the cookies storage type from the storage tree, all the cookies present for that origin will be listed in a table.
...And 4 more matches
Cache - Web APIs
WebAPICache
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle.
...use cachestorage.open() to open a specific named cache object and then call any of the cache methods to maintain the cache.
...each browser has a hard limit on the amount of cache storage that a given origin can use.
...And 4 more matches
TypeScript support in Svelte - Learn web development
previous overview: client-side javascript frameworks next in the last article we learned about svelte stores and even implemented our own custom store to persist the app's information to web storage.
...the first one is easy — the key of our local web storage should be a string.
...update your localstore.ts file like this: // localstore.ts import { writable } from 'svelte/store' import type { jsonvalue } from './types/json.type' export const localstore = (key: string, initial: jsonvalue) => { // receives the key of the local storage and an initial value const tostring = (value: jsonvalue) => json.stringify(value, null, 2) // helper function const toobj = json.parse // helper function if (localstorage.getitem(key) === null) { // item not present in local storage localstorage.setitem(key, tostring(initial)) // in...
...And 3 more matches
History Service Design
places is designed to be a complete replacement for the firefox bookmarks and history systems using storage.
...history service checks for database existance and coherence, and initializes the connection through the storage service.
... database maintenance at startup the service creates an exclusive storage connection to places.sqlite, the exclusive locking is needed for both a perf gain and data-safety.
...And 3 more matches
nsICacheSession
netwerk/cache/public/nsicachesession.idlscriptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentriesifexpired prbool expired entries will be doomed or evicted if this attribute is set to true.
...evictentries() this method evicts all entries for this session's clientid according to its storagepolicy.
...And 3 more matches
nsIMsgFolder
(); void updatefolder(in nsimsgwindow awindow); nsimsgfilterlist getfilterlist(in nsimsgwindow msgwindow); void setfilterlist(in nsimsgfilterlist filterlist); void forcedbclosed(); void delete(); void deletesubfolders(in nsisupportsarray folders, in nsimsgwindow msgwindow); void propagatedelete(in nsimsgfolder folder, in boolean deletestorage,in nsimsgwindow msgwindow); void recursivedelete(in boolean deletestorage, in nsimsgwindow msgwindow); void createsubfolder(in astring foldername, in nsimsgwindow msgwindow); nsimsgfolder addsubfolder(in astring foldername); void createstorageifmissing(in nsiurllistener urllistener); void compact(in nsiurllistener alistener, in nsimsgwindow amsgwindow)...
...tfolderswithflag(in unsigned long flags, in unsigned long resultsize, out unsigned long numfolders); nsisupportsarray getallfolderswithflag(in unsigned long aflag); void getexpansionarray(in nsisupportsarray expansionarray); acstring geturiformsg(in nsimsgdbhdr msghdr); void deletemessages(in nsisupportsarray messages,in nsimsgwindow msgwindow, in boolean deletestorage, in boolean ismove, in nsimsgcopyservicelistener listener, in boolean allowundo); void copymessages(in nsimsgfolder srcfolder, in nsisupportsarray messages,in boolean ismove, in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener, in boolean isfolder, in boolean allowundo); void copyfolder(in nsimsgfolder srcfolder, in boolean ismovefolder,in nsimsgwindow msgwindow, in ...
...t(nsimsgwindow msgwindow); setfilterlist() void setfilterlist(in nsimsgfilterlist filterlist); forcedbclosed() void forcedbclosed(); delete() void delete(); deletesubfolders() void deletesubfolders(in nsisupportsarray folders, in nsimsgwindow msgwindow); propagatedelete() void propagatedelete(in nsimsgfolder folder, in boolean deletestorage, in nsimsgwindow msgwindow); recursivedelete() void recursivedelete(in boolean deletestorage, in nsimsgwindow msgwindow); createsubfolder() void createsubfolder(in astring foldername, in nsimsgwindow msgwindow); addsubfolder() nsimsgfolder addsubfolder(in astring foldername); createstorageifmissing() this method ensu...
...And 3 more matches
XPCOM Interface Reference by grouping
user this section contains elements specific to a given user's data storage.
...domgeopositionerror nsidomgeopositionerrorcallback nsidomgeopositionoptions nsidomglobalpropertyinitializer element nsidomchromewindow nsidomclientrect nsidomelement nsidomhtmlaudioelement nsidomhtmlformelement nsidomhtmlmediaelement nsidomhtmlsourceelement nsidomhtmltimeranges nsidomjswindow nsidomnode nsidomnshtmldocument nsidomstorageitem nsidomstoragemanager nsidomwindow nsidomwindow2 nsidomwindowinternal nsidomwindowutils nsidynamiccontainer nsieditor event nsidomevent nsidomeventgroup nsidomeventlistener nsidomeventtarget nsidommousescrollevent nsidommoztouchevent nsidomorientationevent nsidomprogressevent nsidomsimplegestureevent nsidragdrophandler...
... nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframemessagemanager nsiframeloader nsiframeloaderowner nsiframemessagelistener nsiframemessagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiapplicationcachechannel nsiapplicationcachecontainer nsiapplicationcachenamespace nsiapplicationcacheservice places nsiannotationobserver rss feed nsifeed nsifeedcontainer nsifeedelementbase nsifeedentry nsifeedgenerator nsifeedperson nsifeedprocessor nsifeedprogresslistener nsifeedresult nsi...
...And 3 more matches
Migrating from Firebug - Firefox Developer Tools
storage inspector the cookies panel in firebug displays information related to the cookies created by a page and allows to manipulate the information they store.
... within the devtools this functionality is located within the storage inspector.
... in contrast to firebug the storage inspector not only allows to inspect cookies but also other kinds of storages like the local and session storage, the cache and indexeddb databases.
...And 3 more matches
IndexedDB - Firefox Developer Tools
when you select an origin inside the indexed db storage type in the storage tree of the storage inspector, a table lists the details of all the databases present for that origin.
... note: the data shown in an indexeddb database is a snapshot of the data as it was when you opened the storage inspector tool.
... storage — the storage type specified for the database.
...And 3 more matches
FileHandle API - Web APIs
basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database.
... var idbreq = indexeddb.open("myfilestoragedatabase"); idbreq.onsuccess = function(){ var db = this.result; var buildhandle = db.mozcreatefilehandle("test.txt", "plain/text"); buildhandle.onsuccess = function(){ var myfilehandle = this.result; console.log('handle', myfilehandle); }; }; mozcreatefilehandle() takes two arguments: a name and an optional type.
...see file storage below to learn more about this.
...And 3 more matches
Basic concepts - Web APIs
for more information on how the browser handles storing your data in the background, read browser storage limits and eviction criteria.
...like most web storage solutions, indexeddb follows a same-origin policy.
...while both indexeddb and websql are solutions for storage, they do not offer the same functionalities.
...And 3 more matches
IndexedDB API - Web APIs
indexeddb is a low-level api for client-side storage of significant amounts of structured data, including files/blobs.
...while web storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data.
... note: like most web storage solutions, indexeddb follows a same-origin policy.
...And 3 more matches
LocalFileSystemSync - Web APIs
calling window.requestfilesystemsync() for creates new storage for your web app.
... example //taking care of the browser-specific prefix window.requestfilesystemsync = window.requestfilesystemsync || window.webkitrequestfilesystemsync; // the first parameter defines the type of storage: persistent or temporary // next, set the size of space needed (in bytes) // initfs is the success callback // and the last one is the error callback // for denial of access and other errors.
... method overview filesystemsync requestfilesystemsync (in unsigned short type, in long long size) raises fileexception; entrysync resolvelocalfilesystemsyncurl (in domstring url) raises fileexception; constants constant value description temporary 0 transient storage that can be be removed by the browser at its discretion.
...And 3 more matches
Using Service Workers - Web APIs
to do this, we use service worker’s brand new storage api — cache — a global object on the service worker that allows us to store assets delivered by responses, and keyed by their requests.
...this doesn’t have much of a distinct use the first time your service worker is installed/activated, but it means more when the service worker is updated (see the updating your service worker section later on.) note: localstorage works in a similar way to service worker cache, but it is synchronous, so not allowed in service workers.
... note: indexeddb can be used inside a service worker for data storage if you require it.
...And 3 more matches
WebGLRenderingContext.pixelStorei() - Web APIs
the webglrenderingcontext.pixelstorei() method of the webgl api specifies the pixel storage modes.
... pixel storage parameters parameter name (for pname) description type default value allowed values (for param) specified in gl.pack_alignment packing of pixel data into memory glint 4 1, 2, 4, 8 opengl es 2.0 gl.unpack_alignment unpacking of pixel data from memory.
...lint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with the webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d() methods.
...And 3 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
cookies are mainly used for three purposes: session management logins, shopping carts, game scores, or anything else the server should remember personalization user preferences, themes, and other settings tracking recording and analyzing user behavior cookies were once used for general client-side storage.
... while this was legitimate when they were the only way to store data on the client, it is now recommended to use modern storage apis.
...modern apis for client storage are the web storage api (localstorage and sessionstorage) and indexeddb.
...And 3 more matches
Index of archived content - Archive of obsolete content
clipboard context-menu hotkeys indexed-db l10n notifications page-mod page-worker panel passwords private-browsing querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader chrome console/plain-text console/traceback content/content content/loader ...
... gettabforwindow loaduri quit selecttab tabs helperapps.jsm home.jsm banner panels homeprovider.jsm homestorage nativewindow contextmenus doorhanger menu toast notifications.jsm pageactions.jsm prompt.jsm runtimepermissions.jsm snackbars.jsm sound.jsm ...
...ndix e: dom building and insertion (html & xul) appendix f: monitoring dom changes connecting to remote content custom xul elements with xbl getting started with firefox extensions handling preferences intercepting page loads introduction javascript object management local storage mozilla documentation roadmap observer notifications setting up a development environment the box model the essentials of an extension useful mozilla community sites user notifications and alerts xpcom objects performance best ...
...And 2 more matches
Settings - Archive of obsolete content
the jetpack.storage.settings namespace allows jetpacks to specify user-configurable settings.
...the settings persist across browser sessions and are stored using the jetpack simple storage api.
...because it is still under development, the api currently lives in the future and must be imported before it is used: jetpack.future.import("storage.settings"); specifying settings in a manifest to specify its settings, a jetpack defines a variable named manifest in its global namespace before it imports the settings api.
...And 2 more matches
SQLite Templates - Archive of obsolete content
« previousnext » templates may use a datasource that is retrieved from an sqlite database, such as those used by the mozstorage api.
...to do this, set the querytype attribute on the root node of the template to the value storage.
... <listbox datasources="profile:userdata.sqlite" ref="*" querytype="storage"> <template> <query> select name from myfriends </query> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the query returns the list of values from the 'name' column in the table 'myfriends'.
...And 2 more matches
An overview of NSS Internals
you might want to protect the storage of your secret keys with pbe.
...nss simplifies performing these operations by offering storage and management apis.
...usually, nss will flush all data to disk as soon as new data has been added to permanent storage.
...And 2 more matches
Index
you might want to protect the storage of your secret keys with pbe.
...nss simplifies performing these operations by offering storage and management apis.
...usually, nss will flush all data to disk as soon as new data has been added to permanent storage.
...And 2 more matches
XPCOM Interface Reference
amiwebinstallinfoamiwebinstalllisteneramiwebinstallpromptamiwebinstallerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentativecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestateme...
...ntwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleeditabletextnsiaccessibleeventnsiaccessiblehyperlinknsiaccessiblehypertextnsiaccessibleimagensiaccessibleprovidernsiaccessiblerelationnsiaccessibleretrievalnsiaccessiblerolensiaccessiblescrolltypensiaccessibleselectablensiaccessiblestatechangeeventnsiaccessiblestatesnsiaccessibletablensiaccessibletablecellnsiaccessibletablechangeeventnsiaccessibletextnsiaccessibletextchangeeventnsiaccessibletreecachensiaccessiblevaluensiaccessiblewin32objectnsialertsserv...
...tprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrorn...
...And 2 more matches
Performance
mozstorage uses sqlite as the database backend.
...sharding the cache between connections by default, storage enables the sqlite shared-cache mode which makes multiple connections to the same database share the same cache.
...all you need to do is use services.storage.opendatabase(file).
...And 2 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
storing an image from a foreign origin in this example, we wish to permit images from a foreign origin to be retrieved and saved to local storage.
... implementing the save feature now that the server has been configured to allow retrieval of the images cross-origin, we can write the code that allows the user to save them to local local storage, just as if they were being served from the same domain the code is running on.
...nd saving the image the code that handles the newly-downloaded image is found in the imagereceived() method: function imagereceived() { let canvas = document.createelement("canvas"); let context = canvas.getcontext("2d"); canvas.width = downloadedimg.width; canvas.height = downloadedimg.height; context.drawimage(downloadedimg, 0, 0); imagebox.appendchild(canvas); try { localstorage.setitem("saved-image-example", canvas.todataurl("image/png")); } catch(err) { console.log("error: " + err); } } imagereceived() is called to handle the "load" event on the htmlimageelement that receives the downloaded image.
...And 2 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
the computer must have some memory and ideally some kind of long-term storage.
...the computer must have some memory and ideally some kind of long-term storage.
...the computer must have some memory and ideally some kind of long-term storage.
...And 2 more matches
Web audio codec guide - Web media technologies
generally speaking, the most common reasons to choose lossless audio are because you require archival-quality storage, or because the audio samples will be remixed and recompressed, and you wish to avoid the amplification of artifacts in the audio due to recompression.
... keep in mind, however, that lossless codecs require substantially more bandwidth and storage capacity, and may not be a good choice outside very specific use cases.
...if you need the ability to record audio at a minimal impact to network and/or storage capacity, amr can be a great choice.
...And 2 more matches
Web video codec guide - Web media technologies
a minute of hd video would need 14.93 gb of storage.
... a fairly typical 30 minute video conference would need about 447.9 gb of storage, and a 2-hour movie would take almost 1.79 tb (that is, 1790 gb).
... not only is the required storage space enormous, but the network bandwidth needed to transmit an uncompressed video like that would be enormous, at 249 mb/sec—not including audio and overhead.
...And 2 more matches
Settings - Archive of obsolete content
the jetpack.storage.settings namespace allows jetpacks to specify user-configurable settings.
...the settings persist across browser sessions and are stored using the jetpack [simple storage api][].
...jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above.
... with the above manifest the following stored properties are available in the jetpack's code: * jetpack.storage.settings.twitter.username * jetpack.storage.settings.twitter.password * jetpack.storage.settings.facebook.username * jetpack.storage.settings.facebook.password * jetpack.storage.settings.music * jetpack.storage.settings.volume see also simple storage jep 24 ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
it is a mnemonic for the four basic functions of persistent storage.
...among other features, html5 includes new elements and javascript apis to enhance storage, multimedia, and hardware access.
...of a piece of code — for example "what effect does running that line of javascript have?", or "what purpose or role does that html element have" (rather than "what does it look like?".) 411 serialization codingscripting, glossary, javascript, serialization the process whereby an object or data structure is translated into a format suitable for transferral over a network, or storage (e.g.
... 516 buffer buffer, codingscripting, glossary, needscontent a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.
Index - Learn web development
it allows you to upload code repositories for storage in the git version control system.
... 57 client-side storage api, article, beginner, codingscripting, guide, indexeddb, javascript, learn, storage that's it for now.
... we hope you've found our rundown of client-side storage technologies useful.
... 301 working with svelte stores beginner, frameworks, javascript, learn, stores, svelte, client-side in this article we added two new features: an alert component and persisting todos to web storage.
Sqlite.jsm
the sqlite.jsm javascript code module is a promise-based wrapper around the storage/sqlite interface.
... sqlite.jsm offers some compelling advantages over the low-level storage xpcom interfaces: automatic statement management.
...use of synchronous storage apis is discouraged because they block the main thread.
...else, the resolved value will be an array of mozistoragerow.
Exact Stack Rooting
these three storage regions have different lifetime and overhead characteristics and thus require different management strategies for efficient space and cpu utilization.
... since c++ does not reliably distinguish between storage classes, we have to put this burden on the user.
... gcpointers that reside in gcthings fall into one of these cases: storage in a normal property, storage in a reserved slot, or storage with js_{get|set}private.
... gcthing - storage allocated by spidermonkey's allocator.
nsIMsgCloudFileProvider
remainingfilespace long long readonly: the remaining storage space available for this account in bytes.
... uploadwouldexceedquota 0x8055311b returned when uploading has failed because the user has exceeded their storage quota.
... refreshuserinfo() refreshes the data for this user account - for example, the storage quota, or the amount of storage being used.
... createnewaccount() creates a new user account for the storage provider represented by the nsimsgcloudfileprovider.
The HTML DOM API - Web APIs
access to the browser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events.
...discussion of other areas, such as drag and drop, websockets, web storage, etc.
... web storage interfaces the web_storage_api provides the ability for web sites to store data either temporarily or permanently on the user's device for later re-use.
... storage storageevent web workers interfaces these interfaces are used by the web_workers_api both to establish the ability for workers to interact with an app and its content, but also to support messaging between windows or apps.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
experimental gecko options object options (version and storage) optional in gecko, since version 26, you can include a non-standard options object as a parameter of idbfactory.open that contains the version number of the database, plus a storage value that specifies whether you want to use persistent or temporary storage.
... warning: the storage attribute is deprecated and will soon be removed from gecko.
... you should use storagemanager.persist() to get persistent storage instead.
... note: you can find out more information on the different available storage types, and how firefox handles client-side data storage, at browser storage limits and eviction criteria.
Navigator - Web APIs
WebAPINavigator
properties doesn't inherit any properties, but implements those defined in navigatorid, navigatorlanguage, navigatoronline, navigatorcontentutils, navigatorstorage, navigatorstorageutils, navigatorconcurrenthardware, navigatorplugins, and navigatorusermedia.
... navigatorstorage.storage read only returns the singleton storagemanager object used for managing persistence permissions and estimating available storage on a site-by-site/app-by-app basis.
... navigator.storagequota read only returns a storagequota interface which provides means to query and request storage usage and quota information.
... methods doesn't inherit any method, but implements those defined in navigatorid, navigatorcontentutils, navigatorusermedia, and navigatorstorageutils.
Service Worker API - Web APIs
it is designed to be fully async; as a consequence, apis such as synchronous xhr and localstorage can't be used inside a service worker.
... you can listen for the installevent; a standard action is to prepare your service worker for usage when this fires, for example by creating a cache using the built in storage api, and placing assets inside it that you'll want for running your app offline.
... interfaces cache represents the storage for request / response object pairs that are cached as part of the serviceworker life cycle.
... cachestorage represents the storage for cache objects.
WebGL best practices - Web APIs
for example, within firefox, the only time glgeterror is checked is after allocations (bufferdata, *teximage*, texstorage*) to pick up any gl_out_of_memory errors.
... (in webgl 2, you should just use texstorage with levels=1) one caveat: generatemipmaps only works if you would be able to render into the texture if you attached it to a framebuffer.
... webgl 2 use texstorage to create textures the teximage* api lets you define each mip level independently and at any size, even the mis-matching mips sizes are not an error until draw time which means there is no way the driver can actually prepare the texture in gpu memory until the first time the texture is drawn.
... so, prefer texstorage+texsubimage for textures in webgl 2 invalidateframebuffer storing data that you won't use again can have high cost, particularly on tiled-rendering gpus common on mobile.
Window.requestFileSystem() - Web APIs
window.requestfilesystem(type, size, successcallback[, errorcallback]); parameters type the type of storage to request.
... specify window.temporary if it's acceptable for the browser to delete the files at its own discretion, such as if storage space runs low, or window.persistent if you need the files to remain in place unless the user or the web site or app explicitly permit it.
... persistent storage requires that the user grant the site quota.
... size the amount of storage space you wish to have allocated for your app's use.
Web APIs
WebAPI
long tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api interfaces this is a list of all the interfaces (that is, types of objects) that are available.
...rule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent ...
...ssageevent messageport metadata mimetype mimetypearray mouseevent mousescrollevent mousewheelevent mutationevent mutationobserver mutationobserverinit mutationrecord n ndefmessage ndefreader ndefreadingevent ndefrecord ndefwriter namelist namednodemap navigationpreloadmanager navigator navigatorconcurrenthardware navigatorid navigatorlanguage navigatoronline navigatorplugins navigatorstorage networkinformation node nodefilter nodeiterator nodelist nondocumenttypechildnode notation notification notificationaction notificationevent notifyaudioavailableevent o oes_element_index_uint oes_fbo_render_mipmap oes_standard_derivatives oes_texture_float oes_texture_float_linear oes_texture_half_float oes_texture_half_float_linear oes_vertex_array_object ovr_multiview2 offlineaudioco...
...rcebuffer sourcebufferlist speechgrammar speechgrammarlist speechrecognition speechrecognitionalternative speechrecognitionerror speechrecognitionerrorevent speechrecognitionevent speechrecognitionresult speechrecognitionresultlist speechsynthesis speechsynthesiserrorevent speechsynthesisevent speechsynthesisutterance speechsynthesisvoice staticrange stereopannernode storage storageestimate storageevent storagemanager storagequota stylepropertymap stylepropertymapreadonly stylesheet stylesheetlist submitevent subtlecrypto syncevent syncmanager t taskattributiontiming text textdecoder textencoder textmetrics textrange texttrack texttrackcue texttracklist timeevent timeranges touch touchevent touchlist trackdefault trackdefaultlist trackevent trans...
HTML5 - Developer guides
WebGuideHTMLHTML5
offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently.
... offline & storage offline resources: the application cache firefox fully supports the html5 offline resource specification.
... whatwg client-side session and persistent storage (aka dom storage) client-side session and persistent storage allows web applications to store structured data on the client side.
... indexeddb indexeddb is a web standard for the storage of significant amounts of structured data in the browser and for high performance searches on this data using indexes.
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... "storage" indicates that the server wishes to remove all dom storage for the origin of the response url.
... this includes storage mechanisms such as: localstorage (executes localstorage.clear), sessionstorage (executes sessionstorage.clear), indexeddb (for each database execute idbfactory.deletedatabase), service worker registrations (for each service worker registration, execute serviceworkerregistration.unregister), appcache, websql databases, filesystem api data, plugin data (flash via npp_clearsitedata).
...you can achieve that by adding the clear-site-data header when sending the page confirming that logging out from the site has been accomplished successfully (https://example.com/logout, for example): clear-site-data: "cache", "cookies", "storage", "executioncontexts" clearing cookies if this header is delivered with the response at https://example.com/clear-cookies, all cookies on the same domain https://example.com and any subdomains (like https://stage.example.com, etc), will be cleared out.
Enhanced Extension Installation - Archive of obsolete content
datasource structure since there is now only a single rdf/xml datasource for storage of all installed items, the staggered datasource structure used by firefox 1.0 and the use of an internal composite datasource is no longer required.
... things this upgrade does not do replace rdf/xml as a storage format the rdf/xml datasource back end creates unneccessary and undesirable complexity when saving data.
...extension metadata is structured and not relational in the sense encouraged by rdf, and so a simple text storage format is probably desirable.
Handling Preferences - Archive of obsolete content
the preferences system provides a simple, unified storage facility for name / value mappings.
... when your storage needs are more complicated than this, you'll need more advanced apis that will be discussed in a section further ahead.
...in the past we have used this directory to store xslt files for xml transformations and local storage template files (more on this later).
The new nsString class implementation (1999) - Archive of obsolete content
by default, nsstrings use a 2-byte ucs2 character storage model.
...this means that you can continue to use efficient (temporary) stack buffers for string storage with the bonus of storage pools that serve your specific need.
...nscstring the new nscstring class shares the same api with nsstring, but uses a 1-byte ascii character storage model.
Introduction to web APIs - Learn web development
client-side storage apis are becoming a lot more widespread in web browsers — the ability to store data on the client-side is very useful if you want to create an app that will save its state between page loads, and perhaps even work when the device is offline.
...simple name/value storage with the web storage api, and more complex tabular data storage with the indexeddb api.
... overview: client-side web apis next in this module introduction to web apis manipulating documents fetching data from the server third-party apis drawing graphics video and audio apis client-side storage ...
Handling common JavaScript problems - Learn web development
there are also many new apis appearing in recent browsers, which don't work in older browsers, for example: indexeddb api, web storage api, and others for storing website data on the client-side.
...for example, localforage is a library for client-side data storage, which provides a simple syntax for storing and retrieving data.
... in the background, it uses the best api the browser has available for storing the data, whether that is indexeddb, web storage, or even websql (which is now deprecated, but is still supported in some older versions of safari/ie).
Services.jsm
service accessor service interface service name androidbridge nsiandroidbridge 1 appinfo nsixulappinfo nsixulruntime application information service appshell nsiappshellservice application shell service blocklist nsiblocklistservice blocklist service cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessagesender child process message manager4 crashmanager crashmanager.jsm ...
... dirsvc nsidirectoryservice nsiproperties directory service domstoragemanager nsidomstoragemanager dom storage manager domrequest nsidomrequestservice domrequest service downloads nsidownloadmanager download manager droppedlinkhandler nsidroppedlinkhandler dropped link handler service els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservice nsiioservice2 i/o service locale nsilocaleservice locale service logins nsiloginmanager password manager service metro nsiwinmetroutils 2 mm nsimessagebroadcaster ...
...service preferences service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter s...
Localization Use Cases
first, there is devicestoragehelper.showformatedsize (sic): function showformatedsize(element, l10nid, size) { if (size === undefined || isnan(size)) { element.textcontent = ''; return; } // kb - 3 kb (nearest ones), mb, gb - 1.2 mb (nearest tenth) var fixeddigits = (size < 1024 * 1024) ?
... 0 : 1; var sizeinfo = filesizeformatter.getreadablefilesize(size, fixeddigits); var _ = navigator.mozl10n.get; element.textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } the function is used like so: // application storage updateappfreespace: function storage_updateappfreespace() { var self = this; this.getfreespace(this.appstorage, function(freespace) { devicestoragehelper.showformatedsize(self.appstoragedesc, 'availablesize', freespace); }); }, problem definition for all values of freespace, the following string is enough to construct a grammatically-correct sentence in english: availablesize = {{$size}} {{$unit}} available however, other languages might need to pluralize this string with different forms of the av...
... you'll notice that devicestoragehelper.showformatedsize passes a localized name of the unit to availablesize: function showformatedsize(element, l10nid, size) { // … var _ = navigator.mozl10n.get; element.textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } problem definition even though there's no need to localize the units in english at all, we still need to do it, bec...
NSS 3.31 release notes
allow querying a certificate object for its temporary or permanent storage status in a thread safe way.
... new functions in cert.h cert_getcertisperm - retrieve the permanent storage status attribute of a certificate in a thread safe way.
... cert_getcertistemp - retrieve the temporary storage status attribute of a certificate in a thread safe way.
NSS 3.48 release notes
the master password pbe now uses 10,000 iterations by default when using the default sql (key4.db) storage.
... because using an iteration count higher than 1 with the legacy dbm (key3.db) storage creates files that are incompatible with previous versions of nss, applications that wish to enable it for key3.db are required to set environment variable nss_allow_legacy_dbm_iteration_count=1.
...hash vector acceleration bug 1589073 - use of new pr_assert_arg in certdb.c bug 1590495 - fix a crash in pk11_makecertfromhandle bug 1591742 - ensure des iv length is valid before usage from pkcs#11 bug 1588567 - enable mozilla::pkix gtests in nss ci bug 1591315 - update nsc_decrypt length in constant time bug 1562671 - increase nss mp kdf default iteration count, by default for modern key4 storage, optionally for legacy key3.db storage bug 1590972 - use -std=c99 rather than -std=gnu99 bug 1590676 - fix build if arm doesn't support neon bug 1575411 - enable tls extended master secret by default bug 1590970 - ssl_settimefunc has incomplete coverage bug 1590678 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1588244 - nss changes for delegated credential key strength checks b...
Index
414 js_newstringcopyn jsapi reference, spidermonkey js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring.
... 415 js_newstringcopyz jsapi reference, spidermonkey js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string.
... 416 js_newucstring jsapi reference, spidermonkey js_newstring creates and returns a new string, using the memory starting at buf and ending at buf + length as the character storage.
nsACString
« xpcom api reference summary the nsacstring abstract class represents a character string composed of single-byte storage units.
...}; typedefs char_type [char] storage unit for this class.
... length the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
nsAString
« xpcom api reference summary the nsastring abstract class represents a character string composed of double-byte storage units.
...}; typedefs char_type [prunichar] storage unit for this class.
... length the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
XPCOM glue classes
if there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.ns_postconditionmacrons_preconditionmacronsacstringthe nsacstring abstract class represents a character string composed of single-byte storage units.
... this class is typically used to represent ascii or utf-8 character arrays.nsacstring (external)class declarationnsacstring_internalclass declarationnsadoptingcstringclass declarationnsadoptingstringclass declarationnsastringthe nsastring abstract class represents a character string composed of double-byte storage units.
...ng externalclass declarationnsdependentcsubstringclass declarationnsdependentcsubstring externalclass declarationnsdependentstringclass declarationnsdependentstring externalclass declarationnsdependentsubstringclass declarationnsdependentsubstring externalclass declarationnsembedcstringthe nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated storage.nsembedstringthe nsembedstring concrete class provides a way to construct a nsastring object that allocates null-terminated storage.nsfixedcstringclass declarationnsfixedstringclass declarationnsliteralcstring (external)class declarationnsliteralstring (external)class declarationnsmemorythe nsmemory class provides static helper routines to manage memory.
nsICacheEntryDescriptor
this fails if the storage policy is not store_in_memory.
... storagepolicy nscachestoragepolicy get or set the storage policy of the cache entry.
... see nsicache for the definitions of the storage policies.
nsIContentPrefService2
this parameter relates to private browsing and determines the kind of storage that a method uses, either the usual permanent storage or temporary storage set() aside for private browsing sessions.
... pass null to unconditionally use permanent storage.
... pass an nsiloadcontext to use storage appropriate to the context's useprivatebrowsing attribute: if useprivatebrowsing is true, temporary private-browsing storage is used, and otherwise permanent storage is used.
NS_CStringSetDataRange
acutstart [in] the starting index of the section to replace, measured in storage units.
... acutlength [in] the length of the section to replace, measured in storage units.
... adatalength [in] the length of adata, measured in storage units.
NS_StringSetDataRange
acutstart [in] the starting index of the section to replace, measured in storage units.
... acutlength [in] the length of the section to replace, measured in storage units.
...adatalength [in] the length of adata, measured in storage units.
Filelink Providers
filelink is a thunderbird feature that makes it easy for users to upload large attachments to web-based storage services such as hightail.
... this document explains how to extend thunderbird to support additional web-based storage services.
... filelink storage providers must implement the nsimsgcloudfileprovider interface.
Use SQLite
if you'd like to use an sqlite database in your extension you'll need to look over the storage docs for an api reference, however this code should get you started.
... getservice(ci.nsiproperties); var dbfile = dirservice.get("profd", ci.nsifile); dbfile.append("tbird.sqlite"); var dbservice = cc["@mozilla.org/storage/service;1"].
... getservice(ci.mozistorageservice); var dbconnection; if (!dbfile.exists()) dbconnection = this._dbcreate(dbservice, dbfile); else { dbconnection = dbservice.opendatabase(dbfile); } this.dbconnection = dbconnection; }, _dbcreate: function(adbservice, adbfile) { var dbconnection = adbservice.opendatabase(adbfile); this._dbcreatetables(dbconnection); return dbconnection; }, _dbcreatetables: function(adbconnection) { for(var name in this.dbschema.tables) adbconnection.createtable(name, this.dbschema.tables[name]); }, }; window.addeventlistener("load", function(e) { tbirdsqlite.onload(e); }, false); this is another practical sample on how to handle opendatabase and sql queries on the client side, using in-memory (blob) storage...
Mozilla
creating a login manager storage module the login manager manages and stores user passwords.
... extensions can replace the built-in password storage with their own implementation.
... this can be useful if you want to integrate a gecko application's password management with an existing password management system, or use your own password storage format or database.
Document.cookie - Web APIs
WebAPIDocumentcookie
notes starting with firefox 2, a better mechanism for client-side storage is available - whatwg dom storage.
...it is highly recommended for you to use whatwg dom storage if you are going to keep "client-only" data.
... the reason for the syntax of the document.cookie accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, localstorage): the server tells the client to store a cookie http/1.0 200 ok content-type: text/html set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt [content of the page here] the client sends back to the server its cookies previously stored get /sample_page.html http/1.1 host: www.example.org c...
FileError - Web APIs
WebAPIFileError
in fact, many of the powerful storage apis (such as file system, blobbuilder, and filereader) throw errors if you run the app locally from file://.
... quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
... to ask for more storage, see managing html5 offline storage.
HTMLBodyElement - Web APIs
windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised.
... living standard technically, the event-related properties onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers.
... the following properties have been added: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload.
Using IndexedDB - Web APIs
(to learn more about how much storage you can have for each browser, see storage limits.) obviously, browsers do not want to allow some advertising network or malicious website to pollute your computer, so browsers used to prompt the user the first time any given web app attempts to open an indexeddb for storage.
...also, indexeddb storage in browsers' privacy modes only lasts in-memory until the incognito session is closed (private browsing mode for firefox and incognito mode for chrome, but in firefox this is not implemented yet as of april 2020 so you can't use indexeddb in firefox private browsing at all).
...nd-color: #eeeeee; border-radius: 0.2em; } .note { font-size: smaller; } .destructive { background-color: orange; } .destructive:hover { background-color: #ff8000; } .destructive:active { background-color: red; } javascript content (function () { var compat_envs = [ ['firefox', ">= 16.0"], ['google chrome', ">= 24.0 (you may need to get google chrome canary), no blob storage support"] ]; var compat = $('#compat'); compat.empty(); compat.append('<ul id="compat-list"></ul>'); compat_envs.foreach(function(val, idx, array) { $('#compat-list').append('<li>' + val[0] + ': ' + val[1] + '</li>'); }); const db_name = 'mdn-demo-indexeddb-epublications'; const db_version = 1; // use a long long for this value (don't use a float) const db_store_name = 'pub...
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
... textures webgl2renderingcontext.texstorage2d() specifies all levels of two-dimensional texture storage.
... webgl2renderingcontext.texstorage3d() specifies all levels of a three-dimensional texture or two-dimensional array texture.
HTTP Index - HTTP
WebHTTPIndex
45 http cookies advertising, browser, cookies, cookies article, guide, http, history, javascript, privacy, protocols, server, storage, web development, data, request, tracking an http cookie (web cookie, browser cookie) is a small piece of data that a server sends to the user's web browser.
... 68 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... 268 507 insufficient storage http, server error, status code the hypertext transfer protocol (http) 507 insufficient storage response status code may be given in the context of the web distributed authoring and versioning (webdav) protocol (see rfc 4918).
Progressive web apps (PWAs)
introduction to progressive web apps progressive web app structure making pwas work offline with service workers how to make pwas installable how to make pwas re-engageable using notifications and push progressive loading technology guides client-side storage — a lengthy guide showing how and when to use web storage, indexeddb, and service workers.
... using the web storage api — the web storage api made simple.
... tools localforage — a nice simple javascript library for making client-side data storage really simple; it uses indexeddb by default and falls back to web sql/web storage if necessary.
Displaying annotations - Archive of obsolete content
js first, initialize an array to hold workers associated with the matcher's content scripts: var matchers = []; in the main function, add the code to create the matcher: var matcher = pagemod.pagemod({ include: ['*'], contentscriptwhen: 'ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('matcher.js')], onattach: function(worker) { if(simplestorage.storage.annotations) { worker.postmessage(simplestorage.storage.annotations); } worker.port.on('show', function(data) { annotation.content = data; annotation.show(); }); worker.port.on('hide', function() { annotation.content = null; annotation.hide(); }); worker.on('detach', function () { detachworker(this, matchers); }); matcher...
... then in the module's scope implement a function to update the matcher's workers, and edit handlenewannotation to call this new function when the user enters a new annotation: function updatematchers() { matchers.foreach(function (matcher) { matcher.postmessage(simplestorage.storage.annotations); }); } function handlenewannotation(annotationtext, anchor) { var newannotation = new annotation(annotationtext, anchor); simplestorage.storage.annotations.push(newannotation); updatematchers(); } annotation panel the annotation panel just shows the content of an annotation.
Overview - Archive of obsolete content
additionally, we use the notifications module to notify the user when the add-on's storage quota is full.
... working with data we'll use the simple-storage module to store annotations.
The Essentials of an Extension - Archive of obsolete content
rdf used to be the central storage mechanism for firefox, but it is now being replaced for a simpler database system.
... we'll discuss both of these storage systems further ahead in the tutorial.
Promises - Archive of obsolete content
for (let extension of yield aom.getaddonsbytypes(["extension"])) extension.userdisabled = true; }); json file storage this helper simplifies the use of json data storage files with asynchronous io.
... the jsonstore object must be instantiated with the base name of the storage file and, optionally, a json-compatible object to be used if the file does not yet exist.
Updating addons broken by private browsing changes - Archive of obsolete content
if your code refers to any of the following interfaces: ff 15: nsidomstoragemanager ff 16: nsitransferable ff 18: imgicache moziasyncfavicons nsifaviconservice nsiwebbrowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivatebrowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openbrowserwindow gprivatebrowsingui finally, if your...
... nsistricttransportsecurityservice: processstsheader, removestsstate, isstshost, and isstsuri now take a flags parameter that understands nsisocketprovider.no_permanent_storage or nothing.
Download Manager improvements in Firefox 3 - Archive of obsolete content
firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
...also demonstrates the storage api.
Supporting private browsing mode - Archive of obsolete content
when private browsing mode is enabled, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
... the temporary cookie and local storage databases start out empty.
How to implement a custom XUL query processor component - Archive of obsolete content
xul provides template query processors for rdf, xml and sql (mozstorage).
...ry processor: components.utils.import("resource://gre/modules/xpcomutils.jsm"); // basic wrapper for nsixultemplateresult function templateresult(adata) { this._data = adata; // just make a random number for the id this._id = math.random(100000).tostring(); } templateresult.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsixultemplateresult]), // private storage _data: null, // right now our results are flat lists, so no containing/recursion take place iscontainer: false, isempty: true, mayprocesschildren: false, resource: null, type: "simple-item", get id() { return this._id; }, // return the value of that bound variable such as ?name getbindingfor: function(avar) { // strip off the ?
mozilla.dev.platform FAQ - Archive of obsolete content
then unpack the xul app into the mac structure with xulrunner -install-app q: can you build xulrunner with newer (>1.5) features, such as storage?
... a: xulrunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> q: program received signal exc_bad_instruction, illegal instruction/operand.
2006-11-03 - Archive of obsolete content
tb storage-idea tb is planning to change from mbox-format storage to database-based storage.
... however, user wonder both storage method could exist in tb at the same time without crashing.
Writing JavaScript for XHTML - Archive of obsolete content
that is, you can write something like document.cookie = "key=value"; in xml as well, but nothing is saved in cookie storage.
... solution: use the storage object with firefox 2 there was a new feature enabled, the html 5 storage object.
Introduction to game development for the Web - Game development
ke a look at the core of the web platform: function technology audio web audio api graphics webgl (opengl es 2.0) input touch events, gamepad api, device sensors, webrtc, full screen api, pointer lock api language javascript (or c/c++ using emscripten to compile to javascript) networking webrtc and/or websockets storage indexeddb or the "cloud" web html, css, svg (and much more!) the business case as a game developer, whether you're an individual or a large game studio, you want to know why it makes sense to target the web with your next game project.
... indexeddb a powerful data storage api for maintaining user data on their own computer or device.
HTML text fundamentals - Learn web development
storage refrigerate the finished hummus in a sealed container.
...experiment and see what works for you.</p>\n\n<h2>storage</h2>\n\n<p>refrigerate the finished hummus in a sealed container.
Introduction to the server side - Learn web development
efficient storage and delivery of information imagine how many products are available on amazon, and imagine how many posts have been written on facebook?
... note: your imagination doesn't have to work hard to see the benefit of server-side code for efficient storage and delivery of information: go to amazon or some other e-commerce site.
Error codes returned by Mozilla APIs
303ef) ns_error_dom_too_few_parameters_err (0x805303f0) ns_error_dom_bad_document_domain (0x805303f1) ns_error_dom_prop_access_denied (0x805303f2) ns_error_dom_xpconnect_access_denied (0x805303f3) ns_error_dom_bad_uri (0x805303f4) ns_error_dom_retval_undefined (0x805303f5) ns_error_dom_quota_reached (0x805303f6) an attempt was made to add data into the local or global storage for a given domain that would exceed the amount allowed for that domain.
...luginsnotchanged (0x804c03e8) ns_error_plugin_disabled (0x804c03e9) ns_error_uconv_noconv (0x80500001) ns_error_udec_illegalinput (0x8050000e) ns_imagelib_error_failure (0x80540005) ns_imagelib_error_no_decoder (0x80540006) ns_imagelib_error_not_finished (0x80540007) ns_imagelib_error_load_aborted (0x80540008) ns_error_wont_handle_content (0x805d0001) moz_error_storage_error (0x80630001) ns_error_schemavalidator_no_schema_loaded (0x80640001) ns_error_schemavalidator_no_dom_node_specified (0x80640002) ns_error_schemavalidator_no_type_found (0x80640003) ns_error_schemavalidator_type_not_found (0x80640004) note: there are other errors in these files: gfx/public/nsidevicecontext.h base/public/nsneterror.h parser/htmlparser/public/nsiparser...
Multiple Firefox profiles
to select storage location, click choose folder....
... confirm that you wish to delete the profile: don't delete files removes the profile from the profile manager yet retains the profile data files on your computer in the storage folder so that your information is not lost.
Blocked: Custom cookie permission
message firefox: cookieblockedbypermission=request to access cookies or storage on “x” was blocked because of custom cookie permission.
... a request to access cookies or storage was blocked because there's a custom user-defined permission set.
Errors
this page lists the errors that can be raised due to firefox's anti-tracking functionality, governed by the storage access policy.
... you can find further information about them by clicking on the links below: a request to access cookies or storage was blocked because of a custom cookie permission blocked because it came from a tracker and content blocking is enabled blocked because we are blocking all storage access requests blocked because we are blocking all third-party storage access requests and content blocking is enabled granted partitioned access because it came from a third-party and dynamic first-party isolation is enabled ...
How to implement a custom autocomplete search component
* if removefromdb is set to true, the value should be removed from * persistent storage as well.
... * if removefromdb is set to true, the value should be removed from * persistent storage as well.
Mozilla Framework Based on Templates (MFBT)
threadlocal.h implements thread-local storage, aka "tls", also called thread-specific storage.
... it should be used only for static-storage-duration variables, such as global variables or static class members.
DMD
adb shell am start -n org.mozilla.fennec_$username/.app trigger use the existing memory-report dumping hook: adb shell am broadcast -a org.mozilla.gecko.memory_dump in logcat, you should see output similar to this: i/dmd (20731): opened /storage/emulated/0/download/memory-reports/dmd-default-20731.json.gz for writing ...
... i/geckoconsole(20731): nsimemoryinfodumper dumped reports to /storage/emulated/0/download/memory-reports/unified-memory-report-default-20731.json.gz the path is where the memory reports and dmd reports get dumped to.
Profiling with the Firefox Profiler
this example is for firefox nightly (package name is org.mozilla.fennec_aurora), and you have to allow storage access on permission settings before launching it.
... warning: dumping texture data slows performance considerably, and requires a lot of storage for the profile files.
NSPR's Position On Abrupt Thread Termination
the process abstraction is then responsible for closing all open files and reclaiming all storage that may have been allocated during the process' lifetime.
...when called, the process exits, closing files and reclaiming the process' storage.
NSPR LOG MODULES
examples log everything from the toolkit::storage component that happens, prefixing each line with the timestamp when it was logged to the file /tmp/foo.log (which will be replaced each time the executable is run).
... set nspr_log_modules=timestamp,mozstorage:5 set nspr_log_file=/tmp/foo.log logging with try server for mochitest, edit variable nspr_log_modules in testing/mochitest/runtests.py before pushing to try.
PR_FreeLibraryName
description this function deletes the storage allocated by the runtime in the functions described previously.
... it is important to use this function to rather than calling directly into malloc in order to isolate the runtime's semantics regarding storage management.
PR_GetLibraryName
if sufficient storage cannot be allocated to contain the constructed path name, the function returns null.
... storage for the result is allocated by the runtime and becomes the responsibility of the caller.
PR_GetLibraryPath
if sufficient storage cannot be allocated to contain the copy, the function returns null.
... storage for the result is allocated by the runtime and becomes the responsibility of the caller.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
in jss, the token is called "internal key storage token".
... you can look it up by name using cryptomanager.gettokenbyname(), but a better way is to call cryptomanager.getinternalkeystoragetoken(), which works no matter what the token is named.
JSS Provider Notes
by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss.
... whenever a new thread is created, its token is initialized to the default, the internal key storage token.
Mozilla-JSS JCA Provider notes
by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss.
...whenever a new thread is created, its token is initialized to the default, the internal key storage token.
nss tech note4
this uses pr_alloc to allocate buffer for the decoded value, the caller should free up the storage allocated in value->data.
... this uses pr_alloc to allocate buffer for the decoded value, the caller should free up the storage allocated in value->data.
Overview of NSS
rsa standard that governs password-based cryptography, for example to encrypt private keys for storage.
...rsa standard that governs the storage and encryption of private keys.
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
nss opens new read/write sessions for key generation, some password management, and storage of new certificates.
...in this case nss uses a single token to handle both key and cert storage and crypto operations.
JS_AddArgumentFormatter
(at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant.
... if format is in dynamic storage, the caller must keep the string alive until js_removeargumentformatter is called.
Places
it also includes new features including favicon storage and the ability to annotate pages with arbitrary information.
... places stores its data in an sqlite database using the mozstorage interfaces.
Cut
void cut( index_type acutstart, size_type acutlength ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
Cut
void cut( index_type acutstart, index_type acutlength ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
nsIDOMMozNetworkStatsManager
maxstorageage long long time in milliseconds recorded by the api until present time.
... all samples older than maxstorageage from now are deleted.
nsIDownloadManager
obsolete since gecko 1.8 dbconnection mozistorageconnection the database connection to the downloads database.
...to be removed at the end of the private browsing session, cached in non-permanent storage, etc.) return value the newly created download item with the passed-in properties.
nsIErrorService
should be one of the modules listed in xpcom/base/nserror.h, such as ns_error_module_storage.
...should be one of the modules listed in xpcom/base/nserror.h, such as ns_error_module_storage.
nsIFile
if the current file path corresponds to a regular file (for storage of bytes), and if the new leaf name identifies a regular file that already exists, then this method will overwrite the destination file.
... if the current file path corresponds to a regular file (for storage of bytes), and if the new leaf name identifies a regular file that already exists, then this method will overwrite the destination file.
nsIPrivateBrowsingService
in addition, temporary, databases are created to be used for cookies and local storage; these databases are thrown away when private browsing mode is turned off, and the regular databases are re-activated.
... the temporary cookie and local storage databases start out empty.
nsITraceableChannel
/////// start - do not edit var {classes: cc, interfaces: ci, results: cr, constructor: cc, utils: cu} = components; cu.import('resource://gre/modules/services.jsm'); var binaryinputstream = cc('@mozilla.org/binaryinputstream;1', 'nsibinaryinputstream', 'setinputstream'); var binaryoutputstream = cc('@mozilla.org/binaryoutputstream;1', 'nsibinaryoutputstream', 'setoutputstream'); var storagestream = cc('@mozilla.org/storagestream;1', 'nsistoragestream', 'init'); function tracinglistener() { this.receivedchunks = []; // array for incoming data.
...mise(function(resolve, reject) { this.resolve = resolve; this.reject = reject; }.bind(this.deferreddone)); object.freeze(this.deferreddone); this.promisedone = this.deferreddone.promise; } tracinglistener.prototype = { ondataavailable: function(arequest, acontext, ainputstream, aoffset, acount) { var istream = new binaryinputstream(ainputstream) // binaryainputstream var sstream = new storagestream(8192, acount, null); // storagestream // not sure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come.
nsITransferable
knativeimagemime application/x-moz-nativeimage an image in gecko's native internal image storage format.
... knativehtmlmime application/x-moz-nativehtml html in gecko's native internal storage format.
NS_CStringCutData
acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
NS_StringCutData
acutstart [in] the starting index of the section to remove, measured in storage units.
... acutlength [in] the length of the section to remove, measured in storage units.
Index
25 filelink providers thunderbird filelink is a thunderbird feature that makes it easy for users to upload large attachments to web-based storage services such as hightail.
... 107 use sqlite thunderbird if you'd like to use an sqlite database in your extension you'll need to look over the storage docs for an api reference, however this code should get you started.
Using the Multiple Accounts API
by alec flett alecf@flett.org structure servers identities storage creating new accounts smtp servers appendix a: listing of all preferences and properties structure the account system consists of: the account manager (nsimsgaccountmanager): there is a single account manager in the the client, which maintains the list of accounts, servers, etc.
... in the above example, the list of identities would be as follows: alec flett <alecf@mywork.com>) alec flett <alecf@myisp.com>) alec flett <alecfnospam@myisp.com>) relevant api calls: nsimsgaccount.identities nsimsgaccountmanager.allservers: a list of all servers across all accounts storage the accounts are stored in the preferences.
Working with windows in chrome code
the application object supports a storage property which can be used to store data globally.
... application.storage.set(keyname, data); var data = application.storage.get(keyname, default); where: keyname is a string used to identify the data data is the data default is the data value to return if keyname does not exists pros: its the "right way".
Debugging service workers - Firefox Developer Tools
testing a service worker cache if you are using your service worker to store your site assets in cache storage (using the cache api), which is essential for creating offline apps, it can be annoying to test the cache.
... the firefox devtools’ storage tab has a cache storage section that lists all the different caches you have stored under each different origin.
DirectoryEntrySync - Web APIs
quota_exceeded_error the operation would cause the application to exceed its storage quota.
... quota_exceeded_error the operation would cause the application to exceed its storage quota.
Document - Web APIs
WebAPIDocument
document.hasstorageaccess() returns a promise that resolves with a boolean value indicating whether the document has access to its first-party storage.
... document.requeststorageaccess() returns a promise that resolves if the access to first-party storage was granted, and rejects if access was denied.
EXT_color_buffer_float - Web APIs
color-renderable means: the webglrenderingcontext.renderbufferstorage() method now accepts these formats.
... var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification.
EXT_color_buffer_half_float - Web APIs
extended methods this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba16f_ext and ext.rgba16f_ext.
... examples var ext = gl.getextension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification.
FileSystemEntrySync - Web APIs
quota_exceeded_err the operation would cause the application to exceed its storage quota.
... you can ask for a larger persistent storage, which your user must explicitly grant.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
..._webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: ext.depth_stencil_attachment: depth and stencil buffer data storage.
Permissions.query() - Web APIs
WebAPIPermissionsquery
firefox for example currently supports geolocation, notifications, push, and persistent-storage (see our permissions.webidl file).
... note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api.
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
... syntax var mycachestorage = self.caches; value a cachestorage object.
SubtleCrypto - Web APIs
subtlecrypto.wrapkey() returns a promise that fulfills with a wrapped symmetric key for usage (transfer and storage) in insecure environments.
... storing keys cryptokey objects can be stored using the structured clone algorithm, meaning that you can store and retrieve them using standard web storage apis.
WEBGL_color_buffer_float - Web APIs
extended methods this extension extends webglrenderingcontext.renderbufferstorage(): the internalformat parameter now accepts ext.rgba32f_ext and ext.rgb32f_ext ( ).
... examples var ext = gl.getextension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
...possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
...7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl when using the webgl_depth_texture extension: gl.depth_stencil_attachment: depth and stencil buffer data storage.
WebGLRenderingContext - Web APIs
webglrenderingcontext.pixelstorei() specifies the pixel storage modes webglrenderingcontext.polygonoffset() specifies the scale factors and units to calculate depth values.
... webglrenderingcontext.renderbufferstorage() creates a renderbuffer data store.
Data in WebGL - Web APIs
WebAPIWebGL APIData
shader programs have access to three kinds of data storage, each of which has a specific use case.
... glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
Movement, orientation, and motion: A WebXR example - Web APIs
cubeorientation will store the current orientation of the cube, while cubematrix and mousematrix are storage for matrices used during the rendering of the scene.
... the last four variables declared are storage for references to the <div> elements into which we'll output the matrices when we want to show them to the user.
WindowOrWorkerGlobalScope.caches - Web APIs
the caches read-only property of the windoworworkerglobalscope interface returns the cachestorage object associated with the current context.
... syntax var mycachestorage = self.caches; // or just caches value a cachestorage object.
Event reference
storage events change (see non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast checkboxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid message message open show less common and non-standard events abortable fetch events event name fired when ...
... storage storageevent web storage a storage area (localstorage or sessionstorage) has changed.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
2 allowing cross-origin use of images and canvas advanced, cors, canvas, html, image, reference, security, storage, data html provides a crossorigin attribute for images that, in combination with an appropriate cors header, allows images defined by the <img> element that are loaded from foreign origins to be used in a <canvas> as if they had been loaded from the current origin.
... 126 <input type="file"> directory picker, file, file picker, files, form input, html, html forms, input type, reference, type <input> elements with type="file" let the user choose one or more files from their device storage.
Using the application cache - HTML: Hypertext Markup Language
storage location and clearing the offline cache in chrome you can clear the offline cache by selecting "clear browsing data..." in the preferences or by visiting chrome://appcache-internals/.
... on linux, you can find the setting at edit > preferences > advanced > network > offline web content and user data see also clearing the dom storage data.
JavaScript data types and data structures - JavaScript
it may be necessary to use such techniques in very constrained environments, like when trying to cope with the limitations of local storage, or in extreme cases (such as when each bit over the network counts).
... strings are the common denominator of a lot of apis (input fields, local storage values, xmlhttprequest responses when using responsetext, etc.) and it can be tempting to only work with strings.
JSON.stringify() - JavaScript
var a = json.stringify({ foo: "bar", baz: "quux" }) //'{"foo":"bar","baz":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.push({ 'name': 'screena', 'width': 450, 'height': 250 }); session.screens.push({ 'name...
...': 650, 'height': 350 }); session.screens.push({ 'name': 'screenc', 'width': 750, 'height': 120 }); session.screens.push({ 'name': 'screend', 'width': 250, 'height': 60 }); session.screens.push({ 'name': 'screene', 'width': 390, 'height': 120 }); session.screens.push({ 'name': 'screenf', 'width': 1240, 'height': 650 }); // converting the json string with json.stringify() // then saving with localstorage in the name of session localstorage.setitem('session', json.stringify(session)); // example of how to transform the string generated through // json.stringify() and saved in localstorage in json object again var restoredsession = json.parse(localstorage.getitem('session')); // now restoredsession variable contains the object that was saved // in localstorage console.log(restoredsession); well...
Digital audio concepts - Web media technologies
that's a lot of storage, but worse, it's an insane amount of network bandwidth to use for a relatively short piece of audio.
...ed audio audio loops and samples used in music and sound effects production work situations in which audio clips or samples may be remixed and then compressed; using lossless audio for the mastering process avoids compressing previously compressed data, resulting in additional quality loss factors that may recommend the use of lossy compression include: very large source audio constrained storage (either because the storage space is small, or because there's a large amount of sound to store into it) a need to constrain the network bandwidth required to broadcast the audio; this is especially important for live streams and teleconferencing psychoacoustics 101 diving into the details of psychoacoustics and how audio compression works is far beyond the scope of this article, but it is us...
Same-origin policy - Web security
cross-origin data storage access access to data stored in the browser such as web storage and indexeddb are separated by origin.
... each origin gets its own separate storage, and javascript in one origin cannot read from or write to the storage belonging to another origin.
Module structure of the SDK - Archive of obsolete content
for example, the following add-on contains an additional module directly under "lib", and other modules under subdirectories of "lib": my-addon lib main.js password-dialog.js secrets hash.js storage password-store.js to import modules into main: // main.js code var dialog = require("./password-dialog"); var hash = require("./secrets/hash"); to import modules into password-store: // password-store.js code var dialog = require("../password-dialog"); var hash = require("../secrets/hash"); external modules as well as using the sdk's modules and w...
Program ID - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
Two Types of Scripts - Archive of obsolete content
✔ ✔ globals defined by the html5 specification, such as window, document, and localstorage.
page-worker - Archive of obsolete content
for example, the content script might read some content and send it back to the main add-on, which could store it using the simple-storage api.
private-browsing - Archive of obsolete content
for example, here's an add-on that stores the titles of tabs the user loads, and uses isprivate() to exclude the titles of tabs that were loaded into private windows: var simplestorage = require("simple-storage"); if (!simplestorage.storage.titles) simplestorage.storage.titles = []; require("tabs").on("ready", function(tab) { if (!require("sdk/private-browsing").isprivate(tab)) { console.log("storing..."); simplestorage.storage.titles.push(tab.title); } else { console.log("not storing, private data"); } }); here's an add-on that uses a page-mod to log t...
self - Archive of obsolete content
while not generally of use to add-on code directly, it can be used by internal api code to index local storage and other resources that are associated with a particular add-on.
High-Level APIs - Archive of obsolete content
simple-storage lets an add-on store data so that it's retained across firefox restarts.
cfx - Archive of obsolete content
this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api.
cfx to jpm - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
jpm - Archive of obsolete content
this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api.
Developing for Firefox Mobile - Archive of obsolete content
supported notifications supported page-mod supported page-worker supported panel not supported passwords supported private-browsing not supported querystring supported request supported selection not supported self supported simple-prefs supported simple-storage supported system supported tabs supported timers supported ui not supported url supported widget not supported windows supported low-level apis /loader supported chrome supported console/plain-text supported console/traceback supported content/con...
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
fixme: figure 1: uncheck “exclude browser files.” set up quicknote for the purposes of this explanation, we’re going to use the file-storage mechanism in quicknote1 for our debugger.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
next, it dynamically generates menuitem elements based on the names of all the files in the session-storage directory, and inserts them into the menu.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
it can be used to write or copy necessary files to the profile folder, like the initial db the add-on will use for storage.
Connecting to Remote Content - Archive of obsolete content
this was more useful when rdf was the default storage format.
XUL School Tutorial - Archive of obsolete content
on setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: install and uninstall scripts appendix c: avoiding using eval in add-ons appendix d: loading scripts appendix e: dom building and html insertion a...
Source code directories overview - Archive of obsolete content
storage contains an implementation of sqlite3.
Layout System Overview - Archive of obsolete content
additionally, the presshell provides a specialized storage heap for frames, called an arena, that is used to make allocation and deallocation of frames faster and less likely to fragment the global heap.
JavaScript Client API - Archive of obsolete content
helper to generate new guids: let newguid = utils.makeguid(); your store object must implement the following methods: itemexists(id) createrecord(id, collection) changeitemid(oldid, newid) getallids() wipe() create(record) update(record) remove(record) you may also find it useful to override other methods of the base implementation, for example applyincomingbatch if the underlying storage for your data supports batch operations.
Firefox Sync - Archive of obsolete content
these include: an http api for client-server interaction storage formats used by the the clients cryptographic model for encrypting client data the definitive source for these specifications is http://docs.services.mozilla.com/.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
left-click the button to show popupmenu: var button = $("<div />", document); button.text("click me"); var contextmenu = new jetpack.menu(["do this", "do that", "and the other"]); contextmenu.contexton(button); var popupmenu = new jetpack.menu(["frumpy", "frimpy", "frompy"]); popupmenu.popupon(button); complete jetpacks see a complete, real-word example that you can install in the simple storage documentation.
Message Summary Database - Archive of obsolete content
and we only pay the storage cost for a property if the row has the property set.
FAQ - Archive of obsolete content
ArchiveMozillaPrismFAQ
at the same time, we're also working to increase the capabilities of those apps by adding features to the web itself, like support for offline data storage and access to 3d graphics hardware, that will be available to web applications in both prism and firefox.
RDF Datasource How-To - Archive of obsolete content
typically, you provide a parser for reading in some sort of static storage (e.g., a data file); the parser translates the datafile into a series of calls to assert() to set up the in-memory datasource.
String Quick Reference - Archive of obsolete content
function declarations what: use abstract classes instead of concrete classes when passing strings across function boundaries why: using abstract classes allows the caller to choose the storage mechanism, allowing for possible sharing or more efficient handling of string fragments.
Table Cellmap - Border Collapse - Archive of obsolete content
information storage each cellmap entry stores for tables in the border collapse mode additional information about its top and left edge and its top left corner.
The Download Manager schema - Archive of obsolete content
this information is available using nsidownloadmanager methods to retrieve nsidownload objects for each download entry; however, if you feel like poking directly into the table, you can do so using the storage api.
querytype - Archive of obsolete content
firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
xul provides template query processors for rdf, xml and sql (mozstorage).
Building Trees - Archive of obsolete content
here is an example of a tree using an sqlite datasource: <tree datasources="profile:messages.sqlite" ref="*" querytype="storage" flags="dont-build-content"> <treecols> <treecol id="subject" label="subject" flex="3"/> <treecol id="sender" label="sender" flex="2"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <query> select subject, sender, date from messages </query> <action> <treechildren> <treeitem uri="?"> <treerow> <treecell la...
Template Logging - Archive of obsolete content
only the 'rdf', 'xml' and 'storage' values are provided by default.
The Joy of XUL - Archive of obsolete content
the calendar application is comprised of a xul front end and an xpcom component that leverages libical, a native library written in c, for date operations and calendar data storage.
XUL Questions and Answers - Archive of obsolete content
support for non-rdf datasources for xul template is planned (bug 321170): xml datasources (bug 321171) storage (sqlite) datasources (bug 321172) when loading an xslt stylesheet into an xml i get the error: "error loading stylesheet: an xslt stylesheet load was blocked for security reasons." that error is from a security check that has been put up to safeguard against cross-site-scripting attacks.
XUL element attributes - Archive of obsolete content
firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'.
What XULRunner Provides - Archive of obsolete content
ing and transaction support (no ui) cryptography xbl (xbl2 planned) xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by xulrunner, and may be overridden by embedders under certain circumstances: apis and user interface for installing, uninstalling, and upgrading xul applications.
Archived Mozilla and build documentation - Archive of obsolete content
download manager improvements in firefox 3 firefox 3 offers improvements to the download manager that allow multiple progress listeners, use of the storage api for data management, download resuming, and more.
2006-12-01 - Archive of obsolete content
mozstorage documentation up a revisted discussion surround the mozstorage documentation.
2006-10-27 - Archive of obsolete content
storage calendar optimization a general discussion on optimization of widgets, java and the core of calendar's database.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 27 - november 3, 2006 announcements test day results the calendar qa team had a successful test day on tuesday discussions storage format for events storage format of timestamps in lightning.
NPClass - Archive of obsolete content
this function is expected to allocate and return enough storage to hold the npobject that is being created.
NPN_CreateObject - Archive of obsolete content
description if the given npclass provides an allocate function it is used to allocate the storage for the object and the npp argument passed to npn_createobject() is passed along to that function.
Visual JS GE - Game development
some apps might need to have local storage, for instance, editor.js.
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
it is a mnemonic for the four basic functions of persistent storage.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
each memory storage location has an index or address.
HTML5 - MDN Web Docs Glossary: Definitions of Web-related terms
among other features, html5 includes new elements and javascript apis to enhance storage, multimedia, and hardware access.
Reference - MDN Web Docs Glossary: Definitions of Web-related terms
in computing, a reference is a value that indirectly accesses data to retrieve a variable or a record in a computer's memory or other storage device.
Serialization - MDN Web Docs Glossary: Definitions of Web-related terms
the process whereby an object or data structure is translated into a format suitable for transferral over a network, or storage (e.g.
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
since non-ascii characters require more than one byte for storage, they run the risk of being corrupted if the bytes are separated and not recombined.
buffer - MDN Web Docs Glossary: Definitions of Web-related terms
a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.
How do I use GitHub Pages? - Learn web development
it allows you to upload code repositories for storage in the git version control system.
What is a web server? - Learn web development
deeper dive to review: to fetch a webpage, your browser sends a request to the web server, which searches for the requested file in its own storage space.
Your first form - Learn web development
forms allow users to enter data, which is generally sent to a web server for processing and storage (see sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature).
Publishing your website - Learn web development
it allows you to upload code repositories for storage in the git version control system.
Manipulating documents - Learn web development
using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
Third-party APIs - Learn web development
previous overview: client-side web apis next in this module introduction to web apis manipulating documents fetching data from the server third party apis drawing graphics video and audio apis client-side storage ...
Client-side web APIs - Learn web development
client-side storage modern web browsers feature a number of different technologies that allow you to store data related to web sites and retrieve it when necessary allowing you to persist data long term, save sites offline, and more.
Server-side web frameworks - Learn web development
multiple back-ends for session and cache storage.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
however, because *eventually*, we'll want to persist or sync all changes to the todos list to local storage (see the final version of the app), it makes sense to have all persistent-state-changing operations be in the same place.
Ember interactivity: Events, classes and state - Learn web development
storing todos with a service ember has built-in application-level state management that we can use to manage the storage of our todos and allow each of our components to access data from that application-level state.
Introduction to client-side frameworks - Learn web development
some extra code is inevitable, and a framework that supports tree-shaking (removal of any code that isn't actually used in the app during the build process) will allow you to keep your applications small, but this is still a factor you need to keep in mind when considering your app's performance, especially on more network/storage-constrained devices, like mobile phones.
Deployment and next steps - Learn web development
then we saw how to use stores to work with a central data repository, and we created our own custom store to persist our application's data to web storage.
Dynamic behavior in Svelte: working with variables and props - Learn web development
this would allow us to save them to a web service or local storage and later retrieve them for update.
Cookies Preferences in Mozilla
network.cookie.cookiebehavior default value: 0 0 = accept all cookies by default 1 = only accept from the originating site (block third party cookies) 2 = block all cookies by default 3 = use p3p settings (note: this is only applicable to older mozilla suite and seamonkey versions.) 4 = storage access policy: block cookies from trackers network.cookie.lifetimepolicy default value: 0 0 = accept cookies normally 1 = prompt for each cookie (prompting was removed in firefox 44) 2 = accept for current session only 3 = accept for n days network.cookie.lifetime.days default value: 90 only used if network.cookie.lifetimepolicy is set to 3 sets the number of days that the lifetime of c...
Index
170 storage access policy: block cookies from trackers privacy, storage access policy, tracking protection firefox includes a new storage access policy that blocks cookies and other site data from third-party tracking resources.
Performance best practices for Firefox front-end engineers
use indexeddb for storage appcache and localstorage are synchronous storage apis that will block the main thread when you use them.
Privacy
storage access policy: block cookies from trackerstracking protection ...
Browser API
htmliframeelement.purgehistory() clears all the resources (cookies, localstorage, cache, etc.) associated with the browser <iframe>.
JNI.jsm
; var sig = { environment: 'landroid/os/environment;', string: 'ljava/lang/string;', file: 'ljava/io/file;' }; var environment = jni.loadclass(my_jenv, sig.environment.substr(1, sig.environment.length - 2), { static_fields: [ { name: 'directory_pictures', sig: sig.string } ], static_methods: [ { name:'getexternalstoragedirectory', sig:'()' + sig.file } ] }); jni.loadclass(my_jenv, sig.file.substr(1, sig.file.length - 2), { methods: [ { name:'getpath', sig:'()' + sig.string } ] }); var javafile_dirextstore = environment.getexternalstoragedirectory(); // object { js#obj: cdata } var javastr_dirextstorepath = javafile_dirextstore.getpath(); // object { js#ob...
Log.jsm
logstructured(); name parent removeappender(); updateappenders(); and the methods mentioned below: logger methods loggerrepository(); length: 0 keys of prototype: getlogger(); rootlogger storagestreamappender(); length: 1 keys of prototype: doappend(); getinputstream(); newoutputstream(); outputstream reset(); structuredformatter(); length: 0 keys of prototype: format(); method overv...
OSFile.jsm
this is critical because some platforms have extremely slow storage (e.g.
Webapps.jsm
tioncancelled: function(windowid) denyinstall: function(adata) _setupapp: function(adata, aid) _cloneapp: function(adata, anewapp, alocalemanifest, amanifest, aid, alocalid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _openandreadpackage: function(azipfile, aoldapp, anewa...
JavaScript code modules
sqlite.jsm a promise-based api to mozistorage/sqlite.
about:memory
ent/browser.xul, id=3) │ └───3.59 mb (01.87%) ++ (4 tiny) ├───45.74 mb (23.84%) ++ js-non-window ├───33.73 mb (17.58%) ── heap-unclassified ├───22.51 mb (11.73%) ++ heap-overhead ├────6.62 mb (03.45%) ++ images ├────5.82 mb (03.03%) ++ workers/workers(chrome) ├────5.36 mb (02.80%) ++ (16 tiny) ├────4.07 mb (02.12%) ++ storage ├────2.74 mb (01.43%) ++ startup-cache └────2.16 mb (01.12%) ++ xpconnect some expertise is required to understand the full details here, but there are various things worth pointing out.
Crash reporting
finally, a set of mozilla employees have access to directly query the underlying data in either sql summary or using mapreduce on the storage cluster.
Debugging out-of-memory problems
note: replace "/storage/emulated/0/download/" in the reported file path with the device's download path (e.g.
Firefox Sync
android searchfox has links to the main sync code and the storage layer.
Optimizing Applications For NSPR
at thread switch time, the stack of the current running thread is copied to other storage associated with that thread and the about-to-be-dispatched thread's stack data is copied back onto the windows stack just before the thread is given control.
Interval Timing
nspr 2.0 provides interval times that are efficient in terms of performance and storage requirements.
PR_InitializeNetAddr
the storage for the network address structure is allocated by, and remains the responsibility of, the calling client.
PR_PushIOLayer
some subtle ramifications: the ownership of the storage pointed to by the caller's layer argument is relinquished to the runtime.
PR_SetErrorText
the new value is copied into storage allocated and owned by nspr and remains there until the next call to pr_seterror or another call to pr_seterrortext.
PR_SetLibraryPath
this may indicate that the function cannot allocate sufficient storage to make a copy of the path string description this function registers a default library pathname with the runtime.
FIPS Mode - an explanation
this makes it difficult to move keys from one device to another, and consequently, all crypto engines and key storage must be in a single device rather than being split up into several devices.
NSS 3.38 release notes
nss automatically enables caching for sql database storage on linux, if it is located on a network filesystem that's known to benefit from caching.
NSS API Guidelines
these functions should have the form layer_traversestorageobjectorlist().
NSS Sample Code Sample1
(this key will also be used for // storage of the keys, since nss does not support permanent symmetric // keys at the current time.) // 3.
NSS sources building testing
several tools are general purpose and can be used to inspect and manipulate the storage files that software using the nss library creates and modifies.
Python binding for NSS
review all ref counting, numerous ref counting fixes implement cyclic garbage collection support by adding object traversal and clear methods identify static variables, move to thread local storage remove python-nss specific httplib.py, no longer needed python-nss now compatible with standard library rewrite httplib_example.py to use standard library and illustrate ssl, non-ssl, connection class, http class usage the following classes were added: authkeyid basicconstraints crldistributionpoint crldistributionpts certificateextension ge...
sslfnc.html
unlike nss_init, nss_nodb_init allows applications that do not have access to storage for databases to run raw crypto, hashing, and certificate functions.
Rhino scopes and contexts
execution of scripts requires a scope for top-level script variable storage as well as a place to find standard objects like function and object.
JS::MutableHandle
the underlying storage can be changed.
JSObjectOps.dropProperty
custom jsobjectops implementations can either retain the spidermonkey property storage and locking scheme (by copying all or most of the built-in jsobjectops) or replace it entirely.
JS_GetPropertyAttrsGetterAndSetter
pointer to the storage area into which to place retrieves attributes.
JS_NewDependentString
instead, the new string shares str's existing character storage.
JS_NewUCString
description js_newstring creates and returns a new string, using the memory starting at buf and ending at buf + length as the character storage.
JS_NewStringCopyN
description js_newstringcopyn allocates space for a javascript string and its underlying storage, and copies n characters from a c character array, s, into the new jsstring.
JS_NewStringCopyZ
description js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string.
JS_SET_TRACING_DETAILS
the storage for name or callback's arguments needs to live only until the following call to js_calltracer returns.
Shell global objects
sharedaddress(obj) return the address of the shared storage of a sharedarraybuffer.
WebReplayRoadmap
management of a corpus of recordings (some which may have been made with different builds or operating systems) will be easier to manage, with shared storage in the cloud.
Using RAII classes in Mozilla
static analysis static analysis passes are run on our testing infrastructure using our clang plugin, you can also run them locally marking a raii class for the static analysis is very simple, and performing this marking causes the static analysis to produce a build-time error whenever a raii class is allocated as a temporary, on the heap, or in static storage.
Secure Development Guidelines
name='?'"; sqlite3_prepare_v2(db, str, strlen(str), &stmt, null); sqlite3_bind_text(stmt, 1, name, strlen(name), sqlite_transient); sqlite3_step(stmt); sqlite3_finalize(p_stmt); writing secure code: arithmetic issues integer overflows/underflows overflows occur when an arithmetic operation attempts to create a numeric value that is larger than can be represented within the available storage space max + 1 will be 0 and 0 – 1 will be max!
The Places database
places is designed to be a complete replacement for the firefox bookmarks and history systems using storage.
Places Expiration
all of expiration uses the storage async api, that ensures i/o is in a separate thread, plus it won't block any read thanks to the use of the wal journaling system.
Using the Places annotation service
four functions are provided to get this information: getpageannotationinfo(auri, aname, aflags, aexpiration, amimetype, atype) getitemannotationinfo(aitemid, aname, aflags, aexpiration, amimetype, atype) getpageannotationtype(auri, aname); getitemannotationtype(aitemid, aname); the returned type will be one of the value_type constants in mozistoragevaluearray.idl: after bug 377066 the value_type_* type handling was changed to this: type_int32 = 1 type_double = 2 type_string = 3 type_binary = 4 type_int64 = 5 try { var value = annotationservice.getpageannotation(uri, "my_extension/some_annotation"); } catch(e) { // annotation does not exist } other functions getpageswithannotation(aname, resultcount, results); getitemswith...
FUEL
objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage fueliapplication objects fueliannotations fueliapplication fuelibookmark fuelibookmarkfolder fuelibookmarkroots fuelibrowsertab fueliwindow xpcom although the fuel application object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
SMILE
objects extiapplication objects exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage smileiapplication objects smileibookmarkroots smileiwindow smileibrowsertab smileiapplication xpcom although the extiapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
STEEL
objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage steeliapplication objects steeliapplication xpcom although the steel steeliapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
extIApplication
storage readonly attribute extisessionstorage the storage object for the application.
extIExtension
storage readonly attribute extisessionstorage the storage object for the extension.
Toolkit API
nsion packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps see also the following developer pages contain examples and discussions of particular topics: xul xul overlays developing extensions xulrunner developing themes dom rdf storage ...
XPCOM array guide
MozillaTechXPCOMGuideArrays
nsautotarray<t, n> - a version of nstarray which includes n entries of internal storage for the array data.
Append
adatalength [in] the length of adata, measured in storage units.
Assign
adatalength [in] the length of adata, measured in storage units.
EndReading
the ns_cstringgetdata function can be used to determine if a nsacstring instance has null-terminated storage.
Insert
adatalength [in] the length of adata, measured in storage units.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
Append
adatalength [in] the length of adata, measured in storage units.
Assign
adatalength [in] the length of adata, measured in storage units.
EndReading
the ns_cstringgetdata function can be used to determine if a nsastring instance has null-terminated storage.
Insert
adatalength [in] the length of adata, measured in storage units.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
nsCString
all subclasses promise null-terminated storage.
nsEmbedCString
adatalength [in] the length of adata, measured in storage units.
nsEmbedCString
« xpcom api reference summary the nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated storage.
nsEmbedString
adatalength [in] the length of adata, measured in storage units.
nsEmbedString
« xpcom api reference summary the nsembedstring concrete class provides a way to construct a nsastring object that allocates null-terminated storage.
nsFixedCString
methods constructors void nsfixedcstring(char*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source parameters char* data pruint32 storagesize pruint32 length operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& o...
nsFixedString
methods constructors void nsfixedstring(prunichar*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 storagesize pruint32 length operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_i...
nsString
all subclasses promise null-terminated storage.
imgICache
that is used for fetching images): var tools = components.classes["@mozilla.org/image/tools;1"].getservice(components.interfaces.imgitools); var cache = tools.getimgcachefordocument(relevantdocument); // alternatively, tools.getimgcacheforchannel(relevantchannel) if there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie.
nsIApplicationCache
clients can open a session with nsicacheservice.createsession() using this client id and a storage policy of store_offline to access this cache.
nsIContentPrefService
removegroupedprefs(); void removeobserver(in astring aname, in nsicontentprefobserver aobserver); void removepref(in nsivariant agroup, in astring aname); void removeprefsbyname(in astring aname); void setpref(in nsivariant agroup, in astring aname, in nsivariant avalue); attributes attribute type description dbconnection mozistorageconnection the database connection to the content preferences database.
nsIDBChangeListener
astatus the storage location provided by calling routine for status.
getFile
available on all platforms these symbolic names are available on all platforms (although, of course, they may refer to different physical paths on the storage device).
nsIFormHistory2
ring name, in astring value); boolean entryexists(in astring name, in astring value); boolean nameexists(in astring name); void removeallentries(); void removeentriesbytimeframe(in long long abegintime, in long long aendtime); void removeentriesforname(in astring name); void removeentry(in astring name, in astring value); attributes attribute type description dbconnection mozistorageconnection returns the underlying db connection the form history module is using.
Using nsILoginManager
to do so securely, they can use nsiloginmanager, which provides for secure storage of sensitive password information and nsilogininfo, which provides a way of storing login information.
nsILoginMetaInfo
see also nsiloginmanager nsilogininfo creating a login manager storage module ...
nsIMsgFilterCustomAction
otherwise, be careful * that the action does correct notifications to maintain counts, and correct * manipulations of both imap and local non-database storage of message * metadata.
nsIWebBrowserPersist
embedding/components/webbrowserpersist/nsiwebbrowserpersist.idlscriptable interface for persisting dom documents and uris to local or remote storage.
nsIWindowMediator
they are expected to hand us comparison values which are pulled from general storage in the native widget, and may not correspond to an nsiwidget at all.
nsIWindowWatcher
string aurl, in string aname, in string afeatures, in nsisupports aarguments); void registernotification(in nsiobserver aobserver); void setwindowcreator(in nsiwindowcreator creator); void unregisternotification(in nsiobserver aobserver); attributes attribute type description activewindow nsidomwindow the watcher serves as a global storage facility for the current active (front most non-floating-palette-type) window, storing and returning it on demand.
NS_CStringAppendData
adatalength [in] the length of adata, measured in storage units.
NS_CStringGetData
return values the ns_cstringgetdata function returns the length of adata, measured in storage units (bytes).
NS_CStringInsertData
adatalength [in] the length of adata, measured in storage units.
NS_CStringSetData
adatalength [in] the length of adata, measured in storage units.
NS_StringAppendData
adatalength [in] the length of adata, measured in storage units.
NS_StringGetData
return values the ns_stringgetdata function returns the length of adata, measured in storage units (bytes).
NS_StringInsertData
adatalength [in] the length of adata, measured in storage units.
NS_StringSetData
adatalength [in] the length of adata, measured in storage units.
Warnings
storage sometimes warns about things to stderr.
Getting Started Guide
if you forget to call release, the object will leak, i.e., the storage for that object will never be reclaimed.
Using nsIPasswordManager
to do so securely, they can use nsipasswordmanager, which provides for secure storage of sensitive password information.
XPCOM
in addition to the actual content, some important information is passed with http headers for both http requests and responses.storagestorage is a sqlite database api.
Mozilla technologies
it also includes new features including favicon storage and the ability to annotate pages with arbitrary information.
Using Objective-C from js-ctypes
probably used in more * complex block scenarios involving actual closure variables needing storage * (in `nodobjc`, javascript closures are leveraged instead).
Examine, modify, and watch variables - Firefox Developer Tools
similarly, in global scope you'll see global variables you've defined, like greetme, as well as built-in globals like localstorage and console.
Debugger.Memory - Firefox Developer Tools
substring: the string is a substring of some other string, and points to that string for its storage.
Debugger-API - Firefox Developer Tools
a debugger.environment represents an environment, associating variable names with storage locations.
All keyboard shortcuts - Firefox Developer Tools
de ctrl + shift + m cmd + opt + m ctrl + shift + m open browser console ctrl + shift + j cmd + shift + j ctrl + shift + j open browser toolbox ctrl + alt + shift + i cmd + opt + shift + i ctrl + alt + shift + i open scratchpad shift + f4 shift + f4 * shift + f4 open webide shift + f8 shift + f8 * shift + f8 storage inspector shift + f9 shift + f9 * shift + f9 open debugger 3 ctrl + shift + z cmd + opt + z ctrl + shift + z 1.
Cookies - Firefox Developer Tools
when you select an origin inside the cookies storage type from the storage tree, all the cookies present for that origin will be listed in a table.
Tips - Firefox Developer Tools
storage inspector right-click the column headers to open a menu allowing to toggle the display of the columns.
Firefox Developer Tools
storage inspector inspect cookies, local storage, indexeddb, and session storage present in a page.
Attr.localName - Web APIs
WebAPIAttrlocalName
in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html attributes in html doms and xhtml attributes in xml doms.
Cache.add() - Web APIs
WebAPICacheadd
this consists of calling cachestorage.open to create a new cache, then using cache.add to add an asset to it.
Cache.addAll() - Web APIs
WebAPICacheaddAll
this consists of calling cachestorage.open to create a new cache, then using addall() to add a series of assets to it.
Cache.put() - Web APIs
WebAPICacheput
we construct a custom response like so: check whether a match for the request is found in the cachestorage using cachestorage.match().
Clipboard - Web APIs
WebAPIClipboard
the clipboard is a data buffer that is used for short-term, data storage and/or data transfers, this can be between documents or applications it is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces.
Detecting device orientation - Web APIs
sensors that are commonly capable of detecting devicemotionevent include sensors in laptops to protect moving storage devices.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
Element.localName - Web APIs
WebAPIElementlocalName
in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms.
Event - Web APIs
WebAPIEvent
gamepadevent hashchangeevent idbversionchangeevent inputevent keyboardevent mediastreamevent messageevent mouseevent mutationevent offlineaudiocompletionevent overconstrainederror pagetransitionevent paymentrequestupdateevent pointerevent popstateevent progressevent relatedevent rtcdatachannelevent rtcidentityerrorevent rtcidentityevent rtcpeerconnectioniceevent sensorevent storageevent svgevent svgzoomevent timeevent touchevent trackevent transitionevent uievent userproximityevent webglcontextevent wheelevent constructor event() creates an event object, returning it to the caller.
EventSource - Web APIs
for example, eventsource is a useful approach for handling things like social media status updates, news feeds, or delivering data into a client-side storage mechanism like indexeddb or web storage.
FileException - Web APIs
quota_exceeded_err 10 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
FileSystemDirectoryEntry - Web APIs
function onfs(fs){ fs.root.getdirectory('documents', {create:true}, function(directoryentry){ //directoryentry.isfile === false //directoryentry.isdirectory === true //directoryentry.name === 'documents' //directoryentry.fullpath === '/documents' }, onerror); } // opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, onfs, onerror); properties this interface has no properties of its own, but inherits properties from its parent interface, filesystementry.
FileSystemEntry.copyTo() - Web APIs
fileerror.quota_exceeded_err the operation exceeded the user's storage quota, or there isn't enough storage space left to complete the operation.
FileSystemEntry.moveTo() - Web APIs
fileerror.quota_exceeded_err the operation exceeded the user's storage quota, or there isn't enough storage space left to complete the operation.
FileSystemEntry - Web APIs
// opening a file system with temporary storage window.requestfilesystem(temporary, 1024*1024 /*1mb*/, function(fs) { fs.root.getfile('log.txt', {}, function(fileentry) { fileentry.remove(function() { console.log('file removed.'); }, onerror); }, onerror); }, onerror); properties this interface provides the following properties.
File and Directory Entries API support in Firefox - Web APIs
the original file system api was created to let browsers implement support for accessing a sandboxed virtual file system on the user's storage device.
HTMLCanvasElement.getContext() - Web APIs
(blink only) storage: string that indicates which storage is used ("persistent" by default).
HTMLFrameSetElement - Web APIs
windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised.
History.pushState() - Web APIs
WebAPIHistorypushState
if you need more space than this, you're encouraged to use sessionstorage and/or localstorage.
Ajax navigation example - Web APIs
430: "unassigned", 431: "request header fields too large", 500: "internal server error", 501: "not implemented", 502: "bad gateway", 503: "service unavailable", 504: "gateway timeout", 505: "http version not supported", 506: "variant also negotiates (experimental)", 507: "insufficient storage", 508: "loop detected", 509: "unassigned", 510: "not extended", 511: "network authentication required" }; var oreq, bisloading = false, bupdateurl = false; oloadingbox.id = "ajax-loader"; ocover.onclick = abortreq; oloadingimg.src = "data:image/gif;base64,r0lgodlheaaqapiaap///waaamlcwkjcqgaaagjiyokcgpkskih/c05fvfnd...
Working with the History API - Web APIs
if you need more space than this, you're encouraged to use sessionstorage and/or localstorage.
IDBDatabase: close event - Web APIs
this could happen, for example, if the underlying storage is removed or if the user clears the database in the browser's history preferences.
IDBDatabaseException - Web APIs
quota_err 11 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
IDBFactory.deleteDatabase() - Web APIs
optionsnon-standard in gecko, since version 26, you can include a non-standard optional storage parameter that specifies whether you want to delete a permanent (the default value) indexeddb, or an indexeddb in temporary storage (aka shared pool.) return value a idbopendbrequest on which subsequent events related to this request are fired.
IDBIndex - Web APIs
WebAPIIDBIndex
an index lets you look up records in an object store using properties of the values in the object stores records other than the primary key the index is a persistent key-value storage where the value part of its records is the key part of a record in the referenced object store.
IDBObjectStore.createIndex() - Web APIs
bear in mind that indexeddb indexes can contain any javascript data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
Key Values - Web APIs
ejects removable media (or toggles an optical storage device tray open and closed).
MediaTrackSettings.latency - Web APIs
this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead.
Media Capabilities API - Web APIs
with the media capabilities api, developers can ensure each user is getting the best bitrate and storage savings for their browser, device, and os capabilities.
Node.localName - Web APIs
WebAPINodelocalName
in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms.
OVR_multiview2 - Web APIs
const gl = document.createelement('canvas').getcontext( 'webgl2', { antialias: false } ); const ext = gl.getextension('ovr_multiview2'); const fb = gl.createframebuffer(); gl.bindframebuffer(gl.draw_framebuffer, fb); const colortex = gl.createtexture(); gl.bindtexture(gl.texture_2d_array, colortex); gl.texstorage3d(gl.texture_2d_array, 1, gl.rgba8, 512, 512, 2); ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.color_attachment0, colortex, 0, 0, 2); const depthstenciltex = gl.createtexture(); gl.bindtexture(gl.texture_2d_array, depthstenciltex); gl.texstorage3d(gl.texture_2d_array, 1, gl.depth32f_stencil8, 512, 512, 2); ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.depth_stencil_at...
OffscreenCanvas.getContext() - Web APIs
(blink only) storage: string that indicates which storage is used ("persistent" by default).
Permissions.revoke() - Web APIs
note: the persistent-storage permission allows an origin to use a persistent box (i.e persistent storage) for its storage, as per the storage api.
Permissions - Web APIs
safari ios no support nosamsung internet android full support 9.0persistent-storage permissionchrome full support 71edge full support 79firefox full support 53ie no support noopera full support 58safari no support ...
ServiceWorkerGlobalScope - Web APIs
serviceworkerglobalscope.caches read only contains the cachestorage object associated with the service worker.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.bindFramebuffer() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
possible values: gl.framebuffer: collection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
possible values: gl.renderbuffer: buffer data storage for single images in a renderable internal format.
WebGLTexture - Web APIs
the webgltexture interface is part of the webgl api and represents an opaque texture object providing storage and state for texturing operations.
WebGL constants - Web APIs
attachment 0x8cd6 framebuffer_incomplete_missing_attachment 0x8cd7 framebuffer_incomplete_dimensions 0x8cd9 framebuffer_unsupported 0x8cdd framebuffer_binding 0x8ca6 renderbuffer_binding 0x8ca7 max_renderbuffer_size 0x84e8 invalid_framebuffer_operation 0x0506 pixel storage modes constants passed to webglrenderingcontext.pixelstorei().
WebXR performance guide - Web APIs
they can be thought of as being similar to the registers in a microprocessor: a limited set of memory storage slots for specific kinds of data or use cases.
Functions and classes available to Web Workers - Web APIs
38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin.
Using Web Workers - Web APIs
but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
Web Workers API - Web APIs
but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
Window.open() - Web APIs
WebAPIWindowopen
this function is the lonely key to get back the handle on a window if the developer has access only to its name (the name can be saved with cookies or local storage but not the window object handle).
WindowEventHandlers - Web APIs
windoweventhandlers.onstorage is an eventhandler representing the code to be called when the storage event is raised.
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
WorkerGlobalScope - Web APIs
properties implemented from elsewhere windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
WorkerNavigator - Web APIs
navigator.storageread only returns a storagemanager interface for managing persistance permissions and estimating available storage.
Using XMLHttpRequest - Web APIs
*/, "yourpage.html"); oreq.onload = getheadertime; oreq.send(); do something when last modified date changes let's create two functions: function getheadertime () { var nlastvisit = parsefloat(window.localstorage.getitem('lm_' + this.filepath)); var nlastmodif = date.parse(this.getresponseheader("last-modified")); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { window.localstorage.setitem('lm_' + this.filepath, date.now()); isfinite(nlastvisit) && this.callback(nlastmodif, nlastvisit); } } function ifhaschanged(surl, fcallback) { var oreq = new xmlhttprequest(); oreq.open("head" /*...
Guide to Web APIs - Developer guides
WebGuideAPI
long tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api ...
Audio and Video Delivery - Developer guides
be pretty reliable: audacity — free audio editor and recorder miro — free, open-source music and video player handbrake — open source video transcoder firefogg — video and audio encoding for firefox ffmpeg2 — comprehensive command line encoder libav — comprehensive command line encoder vid.ly — video player,transcoding and delivery internet archive — free transcoding and storage detecting when no sources have loaded to detect that all child <source> elements have failed to load, check the value of the media element's networkstate attribute.
User input and controls - Developer guides
contenteditable demo this is a working example showing how contenteditable can be used to create an editable document section, the state of which is then saved using localstorage.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
onstorage function to call when the storage area has changed.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
allow-storage-access-by-user-activation : lets the resource request access to the parent's storage capabilities with the storage access api.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the intent is to avoid the network and storage bandwidth needed to handle the image until it's reasonably certain that it will be needed.
<input type="datetime-local"> - HTML: Hypertext Markup Language
the problem is with the server side of things: storage of dates greater than 231-1.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
<input> elements with type="file" let the user choose one or more files from their device storage.
HTTP caching - HTTP
WebHTTPCaching
caches have finite storage so items are periodically removed from storage.
Compression in HTTP - HTTP
unlike text, these other media types use lot of space to store their data and the need to optimize storage and regain space was apparent very early.
CSP: sandbox - HTTP
allow-storage-access-by-user-activation lets the resource request access to the parent's storage capabilities with the storage access api.
Index - HTTP
WebHTTPHeadersIndex
20 clear-site-data http, http header, reference, header the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
HTTP headers - HTTP
WebHTTPHeaders
cookies, storage, cache) associated with the requesting website.
An overview of HTTP - HTTP
WebHTTPOverview
proxies may perform numerous functions: caching (the cache can be public or private, like the browser cache) filtering (like an antivirus scan or parental controls) load balancing (to allow multiple servers to serve the different requests) authentication (to control access to different resources) logging (allowing the storage of historical information) basic aspects of http http is simple http is generally designed to be simple and human readable, even with the added complexity introduced in http/2 by encapsulating http messages into frames.
HTTP response status codes - HTTP
WebHTTPStatus
507 insufficient storage (webdav) the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
Meta programming - JavaScript
it is often used as storage backend for the proxy.
DataView() constructor - JavaScript
syntax new dataview(buffer [, byteoffset [, bytelength]]) parameters buffer an existing arraybuffer or sharedarraybuffer to use as the storage backing the new dataview object.
background_color - Web app manifests
note: the background_color member is only meant to improve the user experience while the main stylesheet is loading from the network or the storage media; it is not used by the user agent as the background-color css property when the progressive web app stylesheet is available.
Image file type and format guide - Web media technologies
mime type image/bmp file extension(s) .bmp specification no specification; however, microsoft provides general documentation of the format at docs.microsoft.com/en-us/windows/desktop/gdi/bitmap-storage browser compatibility all versions of chrome, edge, firefox, internet explorer, opera, and safari maximum dimensions either 32,767×32,767 or 2,147,483,647×2,147,483,647 pixels, depending on the format version supported color modes color mode bits per component (d) description greyscale ...
Add to Home screen - Progressive web apps (PWAs)
to make your app work offline, you have to use the service worker api to handle storing the assets offline, and if required, web storage or indexeddb to store its data.
Introduction to progressive web apps - Progressive web apps (PWAs)
this is achieved using a combination of technologies: service workers to control page requests (for example storing them offline), the cache api for storing responses to network requests offline (very useful for storing site assets), and client-side data storage technologies such as web storage and indexeddb to store application data offline.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
caches is a special cachestorage object available in the scope of the given service worker to enable saving data — saving to web storage won't work, because web storage is synchronous.
Tools for SVG - SVG: Scalable Vector Graphics
in gis (geographic information system) applications svg is often used as both storage and rendering format.
Features restricted to secure contexts - Web security
push api 42 17 not supported 44 reporting api supported not supported not supported behind flag since fx 65 service workers 40 17 11.1 44 storage api 55 not supported not supported 51 web authentication api 65 in preview (17) in development 60 web bluetooth 56 not supported not supported not supported web midi (see midiaccess, for example) 43 not supported not supported not supported web crypto api 60 79 not supported 75 secure context r...
Web security
local storage the window object's window.localstorage property is a way for servers to store data on a client that is persistent across sessions.