Chapter 2. localStorage Read Performance
Web Storage (http://dev.w3.org/html5/webstorage/) has quickly become one
of the most popular HTML5-related additions to the web developer toolkit.
More specifically, localStorage
has found
a home in the hearts and minds of web developers everywhere, providing very
quick and easy client-side data storage that persists across sessions. With
a simple key-value interface, we’ve seen sites take advantage of localStorage
in unique and interesting
ways:
Disqus (http://www.disqus.com/), the popular feedback management system, uses
localStorage
to save your comment as you type. So if something horrible happens, you can fire back up the browser and pick up where you left off.Google (http://www.google.com/) and Bing (http://www.bing.com/) store JavaScript and CSS in
localStorage
to improve their mobile site performance (more info: http://www.stevesouders.com/blog/2011/03/28/storager-case-study-bing-google/).
Of the use cases I’ve seen, the Google/Bing approach is one that seems
to be gaining in popularity. This is partly due to the difficulties of
working with the HTML5 application cache and partly due to the publicity
that this technique has gained from the work of Steve Souders and others.
Indeed, the more I talk to people about localStorage
and how useful it can be for storing
UI-related information, the more people I find who have already started to
experiment with this technique.
What I find intriguing about this use of localStorage ...
Get Web Performance Daybook Volume 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.