Quick Tip: Learning About HTML5 Local Storage
videos

Quick Tip: Learning About HTML5 Local Storage

Tutorial Details
  • Technology: HTML5
  • Length: 4 Minutes
  • Topic: Local Storage
This entry is part 6 of 14 in the HTML5 and You Session
« PreviousNext »

In today’s video quick tip, we’re going to build a working, though very basic, to-do list in just a minute or two. Thanks to HTML5′s local storage, we can make advanced browsers “remember” what we type, even after the browser is closed or is refreshed.

“localStorage sets fields on the domain. Even when you close the browser, reopen it, and go back to the site, it remembers all fields in localStorage.”
-QuirksBlog

While obviously not supported across all browsers, we can expect this method to work, most notably, in Internet Explorer 8, Safari 4, and Firefox 3.5. Note that, to compensate for older browsers that won’t recognize local storage, you should first test to determine whether window.localStorage exists.

Support matrix

via http://www.findmebyip.com/litmus/

Add Comment

Discussion 74 Comments

Comment Page 2 of 2 1 2
  1. Alexander says:

    Some additional information about HTML5 and local storage you can find here http://plutov.by/post/html5_local_storage

  2. Tib says:

    Hi
    Nice and simple , tutorial
    what would you say would be best fallback practise when local Storage doesn’t exist ?
    Thanks
    TIbor

Comment Page 2 of 2 1 2

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.