Skip to content

Instantly share code, notes, and snippets.

View emphaticsunshine's full-sized avatar

Mohit Seth emphaticsunshine

View GitHub Profile
@emphaticsunshine
emphaticsunshine / gist:3790614
Created September 26, 2012 21:11 — forked from remy/gist:350433
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();