How can I browse with localstorage disabled?

Haroldo picture Haroldo · Jul 6, 2011 · Viewed 53.5k times · Source

A site I'm building uses localstorage with a fallback to php sessions.

How can I test my website in a localstorage free environment without downgrading Firefox, Internet Explorer 8, Chrome or Safari? So I'm probably looking for an add-on for one of these browsers?

I've tried ie7 mode in ie8 - no joy :(

Answer

Josh Johnson picture Josh Johnson · Jul 6, 2011

For Firefox:

Dom.storage.enabled

The Web Applications 1.0 specification defines a mechanism allowing web pages to store information with a web browser (similar to cookies) called “client-side session and persistent storage.” Although use of session storage is subject to a user’s cookie preferences, this preference allows it to be disabled entirely.

For Chrome:

Chrome/Chromium - disable HTML5 LocalStorage and Databases for all webpages /or ask user

While some resources on the Internet claims that Chrome's cookie blocking does not also block LocalStorage, I just ran a quick test and discovered that it does actually block LocalStorage, (at least in Chrome 12, the current beta version).

For IE:

Internet Explorer

Select “Tools” -> “Internet Options” -> “General” -> check “Delete browsing history on exit”, click on “Delete”, check “Cookies”, click on “Delete” once more and restart your browser afterwards.

Not really sure about Safari but I imagine it is similar to Chrome.