views:

463

answers:

2

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? 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? 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. I am looking for something similiar but for the cache setting, not the popup blocker.

A: 

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.

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.

voyager
I understand that but someone could just bookmark the old URL. I am looking for a way to test for this IE setting.
xx
A: 

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.

Robert Harvey