State Maintenance

DGL 113: Local Storage

To view the state persistence effect, click on Set Local Storage button to set the color item, then reload the page.

You may test the local storage examples in one of the following ways:

  1. view the page hosted on a remote web server.
  2. view the page hosted on a local web server, such as XAMPP or a nodejs web server
  3. view the page with the local file system to test session cookies without using a web server. In that case, you shoud preview it using Firefox browser. If the visual inspection tool doesn't work, use FF's Console tool to inspect the cookies by issuing command, localStorage.