如何使用localstorage禁用浏览? [英] How can I browse with localstorage disabled?
问题描述
我正在建立的网站使用localstorage来回复php会话。
A site I'm building uses localstorage with a fallback to php sessions.
如何在不降级Firefox的情况下在本地存储免费环境中测试我的网站 ,Internet Explorer 8,Chrome或Safari?因此我可能正在为这些浏览器中的一个寻找附加组件?
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?
我试过ie7 mode in ie8 - no joy:(
I've tried ie7 mode in ie8 - no joy :(
推荐答案
对于Firefox:
Web应用程序1.0规范定义了一种机制,允许网页使用称为客户端会话和持久存储的Web浏览器(类似于Cookie)存储信息。
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.
适用于Chrome:
虽然有些互联网上的资源声称Chrome的cookie阻止也不会阻止LocalStorage,我只是运行一个快速测试,发现它确实阻止了LocalStorage,(至少在Chrome 12,当前的测试版)。
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).
不太确定IE,我想像的Safari是类似于Chrome。
Not really sure about IE and I would imagine that Safari is similar to Chrome.
这篇关于如何使用localstorage禁用浏览?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!