Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
116 views
in Technique[技术] by (71.8m points)

html - How can I browse with localstorage disabled?

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 :(

question from:https://stackoverflow.com/questions/6600754/how-can-i-browse-with-localstorage-disabled

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...