Marcus Westin's store.js is fine for fixing the old browsers, but if you are looking toward the future, this is the API you'll want for web storage. Simple, clean, highly functional, with JSON, namespaces, and multiple available extensions (even including one to help with the old browsers for sticklers).
Store2.js - a better way to use localStorage and sessionStorage | Heykuki News