O'Reilly logo

Instant HTML5 Local Storage How-to by Alex Libby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Providing fallback support (Should know)

In this recipe, we're going to take a look at how you can provide the fallback support, using the store.js library.

Getting ready

For this recipe, we'll need a copy of the open source store.js library, which is available from https://github.com/marcuswestin/store.js/archive/master.zip. We will also need a working installation of WAMP Server, or an available remote site, where we can upload the code. I will assume you're using WAMP Server, for the purposes of the demo. We will, of course, also need our trusty text editor!

How to do it...

Perform the following steps. for providing the fallback support:

  1. Let's begin with adding the following code to a new HTML document. Then, save it as fallback.html:
    <!DOCTYPE html> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required