Persistent storage

Overview

Project lead: Paul Jackson (@pjackson28)

Purpose

The HTML5 Web Storage localStorage object is used to store data persistently (no expiration date). Because some browsers do not support this functionality natively, this polyfill emulates the same functionality.

Implementation

Use the polyfill, the localStorage to store data persistently. In cases where a browser doesn't support this object, the polyfill is automatically loaded.

Example code

value = localStorage.getItem('variable');
localStorage.setItem('variable', value);

Examples

Development

Persistent storage functionality is dependent upon native support for the HTML5 Web Storage localStorage object or the localStorage polyfill.

The code for the localStorage polyfill is located within the source folder of WET:

Known issues

There are no known issues at this point in time.

Version history

References