I need to keep a particular page from being auto-cached on a user's PC. I have experienced that some visitors' computers are caching my pages, which isn't that big of a problem usually, but this particular page is an order form that changes frequently. Is there any meta code or otherwise to instruct the browser NOT to cache the page?
I'm not seeking to prevent someone from purposefully doing this, only to keep the browser from doing it automatically...?
Msg#: 4675 posted 10:30 pm on Feb 14, 2004 (gmt 0)
This is difficult to do, even if you use HTTP or HTML headers to say that a file should not be cached, some browsers are configured to ignore this and cache it anyway. Then use the version from the cache for the current session, without checking the server to see if any changes have taken place.
One way to get around this is to trick the browser into thinking that the file is created by a script and could be different each time it is retrieved from the server. You can do that by adding a '?' to the end of the url. For example [example.org...]
The webserver will ignore the '?' and still serve up the correct page.