For simple data storage, the Web Storage specification offers two basic mechanisms,
sessionStorage, that can preserve data respectively indefinitely, or on a browser-session basis.
Some of this data need to be encrypted, the Web Cryptography API from the Web Cryptography Working Group exposes strong cryptography primitives to Web applications, and can be bound to pre-provisioned keys via the WebCrypto Key Discovery API.
download attribute provides a simple mechanism to trigger a file download (rather than a page navigation), with the possibility of setting a user-friendly filename.
Technologies in progress
Although the notion is less prevalent on mobile, there is generally at least some sort of concept of a file system. The File API provides an API for representing file objects in web applications, as well as programmatically selecting them and accessing their data. The API is read-only. Discussions on a read-write API have now resumed, see Writable Files below.
As more and more data need to be stored by the browser (e.g. for offline usage), it becomes critical for developers to get reliable storage space. The proposed Storage specification will allow Web applications to get quota estimate for storage as well as to request that the data stored by the application be treated as persistent and cannot be evicted without the user’s explicit consent.
The Writable Files specification is an early API proposal that lets Websites gain write access to the native file system. It builds on top of the File API.
|Feature||Specification / Group||Implementation intents|
|Quota for storage||Storage|
|File operations||Writable Files|
Web Platform Incubator Community Group
- Quota management API
- Work on the Quota Management API, started in the Web Platform Working Group to expose an API to manage usage and availability of local storage resources, was discontinued in favor of the newer Storage proposal.
- Client-side SQL-based database
- The work around a client-side SQL-based database, which had been started in 2009, has been abandoned in favor of the work on IndexedDB.
- Address book data
- Communication applications can benefit from integrating with their users’ existing data records; on mobile devices, the address book is a particularly useful source of information. For Web apps outside of the browser, a purely programmatic approach was part of the System Applications Working Group; since this group has now closed, no further work on the Contacts Manager API is expected for the time being. Within the browser, HTML provides autocompleted fields for contacts information that would let browsers re-use data from address books.