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

Chapter 1. Instant HTML5 Local Storage How-to

Welcome to Instant HTML5 Local Storage How-to, where we will take you on a journey through using Local Storage, using the new HTML5 standard tags, which are now available in most modern browsers.

Basic use of Local Storage (Must know)

When using HTML5 Local Storage, there are two types that you can use—local storage and session storage. We'll begin by looking at the former first, using a simple form as the basis for our recipe.

Getting ready

For this recipe, all you need is your browser and favorite text editor.

How to do it...

Perform the following steps:

  1. Let's begin with creating a blank document in your text editor. Then, add the following code and save it as a test localdemo.html:
    <!DOCTYPE html> <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