Instant HTML5 Local Storage How-to [Instant]

This title is available as an eBook only
Instant HTML5 Local Storage How-to [Instant]
eBook: $12.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print & eBook also available on:
Learn in an Instant - Short, Fast, Focused
Table of Contents
Sample Chapters
  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
  • Learn the basics of how to use the LocalStorage standard, and view the results in your browser
  • Learn how to detect when you can use LocalStorage, or when to fall back to using cookies, as well as how to convert an existing site to use LocalStorage
  • Using LocalStorage to store images, arrays, and objects for use in your site

Book Details

Language : English
eBook : 80 pages
Release Date : March 2013
ISBN : 1849699313
ISBN 13 : 9781849699310
Author(s) : Alex Libby
Topics and Technologies : All Books, Instant, Web Development, Web Development

Table of Contents

Instant HTML5 Local Storage How-to
  • Instant HTML5 Local Storage How-to
    • Basic use of Local Storage (Must know)
    • Viewing Local Storage content in a browser (Must know)
    • Basic demo for Session Storage (Must know)
    • Comparing Local Storage and Session Storage (Should know)
    • Using web storage instead of cookies (Must know)
    • Basic detection for storage support (Must know)
    • Improving detection using Modernizr (Should know)
    • Providing fallback support (Should know)
    • Is the user online or offline? (Become an expert)
    • Using a manifest for caching (Become an expert)
    • Providing support for the mobile platform (Should know)
    • Building a simple plugin using jQuery (Should know)
    • Adding objects, arrays, and TTL support to storage (Become an expert)
    • Storing images within Local Storage (Become an expert)
    • Adjusting the Local Storage space for browsers (Must know)
    • Building a stickies option for using in a browser (Become an expert)
    • Building a simple to-do list (Become an expert)
    • Using Local Storage in a form (Become an expert)
    • Using Local Storage in a CMS (Become an expert)
    • Using Local Storage to hide sign-up forms (Become an expert)

Alex Libby

Alex Libby is from an IT support background. He has been involved in supporting end users for the last 15 years in a variety of different environments, and currently works as a Technical Analyst, supporting a medium-sized SharePoint estate for an international parts distributor, based in the UK. Although Alex gets to play with different technologies in his day job, his first true love has always been with the Open Source movement, and in particular experimenting with CSS/CSS3 and HTML5. To date, Alex has written five books based on jQuery, HTML5 Video, and CSS for Packt Publishing, and has reviewed several more (including one on Learning jQuery). jQuery UI 1.10: The User Interface Library for jQuery is Alex's sixth book with Packt Publishing.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 1 submitted: last submission 15 Jul 2013

On page number 59, under bullet number 2, the second line in the code is as follows:

script src= type="text/ javascript">

It should be as follows:

<script src="" type="text/ javascript"></script>

Sorry, there are currently no downloads available for this title.

Frequently bought together

Instant HTML5 Local Storage How-to [Instant] +    Microsoft SharePoint 2010 Enterprise Applications on Windows Phone 7 =
50% Off
the second eBook
Price for both: €21.80

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Basic usage of HTML5 Storage, including its limitations and security
  • Viewing localStorage content in my browser
  • Building a basic demo using session and local storage
  • Adding detection to a site to determine when you can use LocalStorage
  • Implementing application caching, with checks to determine online status
  • Using web storage instead of cookies
  • Building a simple plugin using jQuery
  • Adding objects, arrays, images, and TTL support to storage
  • Adjusting local storage space for browsers

In Detail

The use of cookies to store information in a browser has been around for over a decade; its simplicity has led to its use in a variety of applications, such as online shopping baskets, but which has also lead to some inherent drawbacks in terms of security and use. HTML5 LocalStorage brings much needed additional functionality to your browser, allowing you to store more useful information that you can later reference in your websites.

"Instant HTML5 Local Storage How-to" is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the power of the LocalStorage standard, and give you a good grounding in incorporating it into current or future website projects.

This book looks at how you can incorporate the HTML5 LocalStorage standard into your websites, using the power of modern browsers to store useful information that can be referenced at any time without recourse to the server.

You will also learn how to test for browser capability, and when the browser platform being used requires that you fall back to using cookies. We will also take a look at how you can store more relevant content, such as images or content from arrays, even though the normal standard requires content to be stored in string format. You will also learn how you can make content available offline using application caching, as well as how to incorporate LocalStorage into a plugin using jQuery that you can then incorporate into your sites in the future.

We will also look at some real-life examples, where "Instant HTML5 Local Storage How-to" will take you through how you could incorporate LocalStorage into your sites; we’ll take a look at code you can simply add to a site, or use as a development platform for your own future projects.


Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. Get the job done and learn as you go. Step-by-step recipes to get to grips with the LocalStorage standard.

Who this book is for

This book is great for those who maintain sites that use cookies in some form or another, and who want to learn how to take advantage of the LocalStorage standard to improve browser security and store more relevant information that can be retrieved at some point in the future, without recourse to the server.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software