Not sure why expiration isn’t built into the HTML5 specs for LocalStorage, but I put together this little snippet today. It uses Modernizr (http://www.modernizr.com/) to check for LocalStorage support. AZHU.storage = { save : function(key, jsonData, expirationMin){ if (!Modernizr.localstorage){return false;} var expirationMS = expirationMin * 60 * 1000; var record = {value: JSON.stringify(jsonData), timestamp: new […]
-
Recent Posts
Archives
- May 2017
- April 2017
- March 2017
- May 2016
- April 2012
- July 2011
- June 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- April 2010
- December 2009
- October 2009
- August 2009
- May 2009
- April 2009
- February 2009
- January 2009
- December 2008
- October 2008
- July 2008
- April 2008
- February 2008
Meta