Skip to content

Instantly share code, notes, and snippets.

View mpjura's full-sized avatar

Mike Pjura mpjura

  • Hearst Digital Media
  • NY
View GitHub Profile
@mpjura
mpjura / gist:3782195
Created September 25, 2012 14:16 — 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();