Instant HTML5 Local Storage How-to

More Information
Learn
  • 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
About

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.

Features
  • 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
Page Count 80
Course Length 2 hours 24 minutes
ISBN 9781849699327
Date Of Publication 25 Mar 2013

Authors

Alex Libby

Alex Libby has a background in IT support. He has been involved in supporting end users for almost 20 years in a variety of different environments; a recent change in role now sees Alex working as an MVT test developer for a global 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, jQuery, and HTML5. To date, Alex has written 11 books on subjects such as jQuery, HTML5 Video, SASS, and CSS for Packt, and has reviewed several more. Responsive Web Design with HTML5 and CSS3 Essentials is Alex's twelfth book for Packt, and second completed as a collaboration project.