balupton/history.js — pull request #171 by jayphelps (2012-03-30 21:10:52+00:00)
Title: Safari throws exception in Private Browsing mode due to setItem use.

In Safari, Private Browsing mode causes Session/Local Storage objects to still exist, but any attempt to use them throws an exception. To resolve, obviously I just wrapped the single setItem call in a try/catch.

QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota."