Web Storage

Web Storage
HTML
This box: view · talk · edit

Web Storage and DOM Storage (Document Object Model) are web application software methods and protocols used for storing data in a web browser. Web storage supports persistent data storage, similar to cookies, as well as window-local storage.

Web storage is being standardized by the World Wide Web Consortium (W3C). It was originally part of the HTML 5 specification, but is now in a separate specification.[1] It is supported by Internet Explorer 8, Mozilla-based browsers (e.g., Firefox 2+, officially from 3.5),[2] Safari 4, Google Chrome 4 (sessionStorage is from 5), and Opera 10.50. As of 14 July 2010 (2010 -07-14) only Opera supports the storage events.[3]

Contents

Features

Web storage can be viewed simplistically as an improvement on cookies, providing much greater storage capacity (5MB per domain in Mozilla Firefox,[4] Google Chrome, and Opera, 10MB per storage area in Internet Explorer[5]) and better programmatic interfaces. However, it differs from cookies in some key ways.

Client-side interface

Unlike cookies, which can be accessed by both the server and client side, Web storage falls exclusively under the purview of client-side scripting. Web storage data is not transmitted to the server in every HTTP request, and a web server can't directly write to Web storage, but can of course issue read and write requests.

Local and session storage

Web storage offers two different storage areas—local storage and session storage—which differ in scope and lifetime. Data placed in local storage is per domain (it's available to all scripts from the domain that originally stored the data) and persists after the browser is closed. Session storage is per-page-per-window and is limited to the lifetime of the window. Session storage is intended to allow separate instances of the same web application to run in different windows without interfering with each other, a use case that's not well supported by cookies.[6]

Data model

Web storage currently provides an associative array data model where the keys and values are both strings. An additional API for accessing structured data, perhaps based on SQL, is being considered by the W3C Web Applications Working Group.[7]

Nomenclature

The W3C draft is titled "Web Storage", but "DOM storage" is also a commonly used name.[8][9]

The "DOM" in DOM storage doesn't literally refer to the Document Object Model. "The term DOM is used to refer to the API set made available to scripts in Web applications, and does not necessarily imply the existence of an actual Document object..."[10]

Web Storage Management

Storage of Web Storage Objects is enabled per default in Mozilla Firefox and Seamonkey, but can be disabled by setting the "about:config" parameter "dom.storage.enabled" to false. [11]

Mozilla Firefox stores all Web Storage objects in a single file named webappsstore.sqlite. The sqlite3 command can be used to show the elements stored therein. [12]

There are browser extensions/add-ons for Google Chrome and Mozilla Firefox available that let the user deal with web Storage, such as "Click&Clean",[13][14] "BetterPrivacy" which can be configured to remove the whole Web Storage automatically on a regular basis.[15][16][17]

Similar technologies

References

  1. ^ Web Storage. W3.org. Retrieved on 2011-06-12.
  2. ^ Mozilla Developer Center: DOM Storage. Developer.mozilla.org. Retrieved on 2011-06-12.
  3. ^ Web Storage (DOM Storage). Dive Into JavaScript (2010-07-14). Retrieved on 2011-06-12.
  4. ^ John Resig: DOM Storage. Ejohn.org. Retrieved on 2011-06-12.
  5. ^ MSDN: Introduction to DOM Storage. Msdn.microsoft.com. Retrieved on 2011-06-12.
  6. ^ W3C: Web Storage draft standard. Dev.w3.org (2004-02-05). Retrieved on 2011-06-12.
  7. ^ W3C: Web SQL Database (working draft). W3.org (2010-11-18). Retrieved on 2011-06-12.
  8. ^ Mozilla Developer Center: DOM Storage. Developer.mozilla.org. Retrieved on 2011-06-12.
  9. ^ MSDN: Introduction to DOM Storage. Msdn.microsoft.com. Retrieved on 2011-06-12.
  10. ^ W3C: Web Storage draft standard. Dev.w3.org (2004-02-05). Retrieved on 2011-06-12.
  11. ^ Mozillazine article on disabling Web Storage Objects in about:config. Kb.mozillazine.org. Retrieved on 2011-06-12.
  12. ^ Firefox’s Super Cookies, Cerias, January 16, 2008
  13. ^ "Click&Clean" extension for Google Chrome. Hotcleaner.com (2011-06-01). Retrieved on 2011-06-12.
  14. ^ "Click&Clean add-on for Mozilla Firefox. Addons.mozilla.org. Retrieved on 2011-06-12.
  15. ^ Mozilla add-ons page for "Better Privacy". Addons.mozilla.org. Retrieved on 2011-06-12.
  16. ^ Homepage of "Better Privacy", with some further references to blogs and articles. Netticat.ath.cx. Retrieved on 2011-06-12.
  17. ^ Google Chrome Browser Client-Side Storage. Hotcleaner.com. Retrieved on 2011-06-12.
  18. ^ Indexed Database API. W3.org. Retrieved on 2011-06-12.

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Web Storage —     HTML HTML и HTML5 Динамически …   Википедия

  • Web storage — Накопитель ленты …   Краткий толковый словарь по полиграфии

  • Web colors — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video HTML scrip …   Wikipedia

  • Storage World Conference — (sometimes called SWC) is a for data storage professionals in the United States. Associated with the Association of Storage Networking Professionals, SWC has been held since 2001. 2006 will see two SWC conferences: * June 20, 2006 through June 22 …   Wikipedia

  • Web mapping — is the process of designing, implementing, generating and delivering maps on the World Wide Web and its product. While web mapping primarily deals with technological issues, web cartography additionally studies theoretic aspects: the use of web… …   Wikipedia

  • Web-Based Enterprise Management — (WBEM) is a set of systems management technologies developed to unify the management of distributed computing environments. WBEM is based on Internet standards and Distributed Management Task Force (DMTF) open standards: Common Information Model… …   Wikipedia

  • Web Services Enhancements — (WSE) is an add on to the Microsoft .NET Framework which includes a set of classes that implement additional WS * web service specifications chiefly in areas such as security, reliable messaging, and sending attachments.[1] Web services are… …   Wikipedia

  • Web application — For applications accessed through the web that are executed client side, see Rich Internet application. Google Calendar is a contact and time management web application offered by Google …   Wikipedia

  • Storage Management Initiative - Specification — SMI S, or the Storage Management Initiative Specification, is a storage standard developed and maintained by the Storage Networking Industry Association (SNIA). It has also been ratified as ANSI standard… …   Wikipedia

  • Web 2.0 — A tag cloud (a typical Web 2.0 phenomenon in itself) presenting Web 2.0 themes The term Web 2.0 is associated with web applications that facilitate participatory information sharing, interoperability, user centered design,[1] and collaboration on …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”