Skip to content

Instantly share code, notes, and snippets.

Jarrod Irwin jarrodirwin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jarrodirwin on github.
  • I am marine0089 ( on keybase.
  • I have a public key ASCy6of8njfj1lRUp5hn8CGX86GK8RDifRYc4OEnCGYbVwo

To claim this, I am signing this object:

jarrodirwin / storagePolyfill.js
Last active Jun 9, 2020 — forked from remy/gist:350433
LocalStorage/SessionStorage Polyfill with Safari Private Browsing support.
View storagePolyfill.js
// Refer to
try {
// Test webstorage existence.
if (!window.localStorage || !window.sessionStorage) throw "exception";
// Test webstorage accessibility - Needed for Safari private browsing.
localStorage.setItem('storage_test', 1);
} catch(e) {
(function () {
var Storage = function (type) {
You can’t perform that action at this time.