[英]Detect IE setting: check for newer versions of stored pages “never”
I understand there isn't a way to interrogate a users IE settings directly due to security reasons, but is there a way to derive this answer with some other mechanism? 我了解由于安全原因,没有办法直接询问用户的IE设置,但是有没有办法通过其他某种机制得出此答案? I would like to stop a user from using my site if the setting "Check for newer versions of stored pages" is set to "Never".
如果设置“检查存储页面的较新版本”设置为“从不”,我想阻止用户使用我的网站。 Any suggestions?
有什么建议么?
Is there a way I could test for this using javascript? 有没有一种方法可以使用javascript测试呢? An example of what I am trying to accomplish is this: While it is not possible to check IE settings to see if you are running a popup blocker, that is a way to "test" for a popup blocker via javascript.
我要完成的一个示例是: 虽然无法检查IE设置以查看您是否正在运行弹出窗口阻止程序,但这是一种通过javascript“测试”弹出窗口阻止程序的方法。 I am looking for something similiar but for the cache setting, not the popup blocker.
我正在寻找类似的东西,但需要缓存设置,而不是弹出窗口阻止程序。
Append something to the querystring that is unlikely to have been used before (a datestring, a random number). 在查询字符串上附加以前不太可能使用的内容(日期字符串,随机数)。
That will make IE 6 request the page again, as far as IE is concerned, its another page. 就IE而言,这将使IE 6再次请求页面,即其另一个页面。
So if you have http://somepage.com/dontcachethis.html
you'd replace this with something like http://somepage.com/dontcachethis.html?please=23143425
where you asign please
a random number. 所以,如果你有
http://somepage.com/dontcachethis.html
你会喜欢的东西替换此http://somepage.com/dontcachethis.html?please=23143425
,你ASIGN please
一个随机数。
Add the following to your web pages: 将以下内容添加到您的网页:
meta http-equiv="Pragma" content="no-cache"
meta http-equiv="Expires" content="0"
This forces the user's browser to reload the pages every time, regardless of the browser's cache settings. 这将强制用户的浏览器每次都重新加载页面,而不管浏览器的缓存设置如何。
I've not implemented this yet, but this is my plan: 我还没有实现,但这是我的计划:
If I've detected that they have an old version of a page, I could do a couple things: 如果我检测到他们的页面版本较旧,则可以执行以下操作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.