I discovered that each of the answers on this page continue to had issues. In particular, I seen that none of these would stop IE8 from utilizing a cached version with the page when you accessed it by hitting the back button.
On second believed I discourage all to make use of ClearHeaders process. It can be far better to eliminate headers separately. And also to set Cache-Control header properly I'm using this code:
KJ SaxenaKJ Saxena 21.9k2424 gold badges8686 silver badges111111 bronze badges 1 9 ...That is old, so presumbably your recommendation is that It's because in more recent implementations this may usually be interpreted since the cacheing header cache-control: no-cache. So actually you would be improved to utilize the more modern-day
Certainly, this is probably not feasible being carried out across the entire site, but at least for a few essential pages, you are able to do that. Hope this helps.
Not sure if my remedy sounds basic and stupid, and perhaps it's got previously been known to you since long time in the past, but considering that preventing an individual from employing browser back button to check out your historical pages is among your ambitions, You need to use:
If we really don't find a method to rebuild from scratch, there are other strategies but it is important to recollect that these generally delete much more than it can be required.
Note that https is needed because Opera wouldn't deactivate history buffer for basic http pages. For those who really can not get https and you simply are ready to overlook Opera, the best you are able to do Is that this:
Then just decorate your controller with [NoCache]. OR to do it for all you might just place the attribute over the class from the base class that you inherit your controllers from (in case you have a person) like we have here:
For stability factors we don't want selected pages within our software for being cached, at any time, by the world wide web browser. This have to work for at least the following browsers:
But that might fail if e.g. the end-user manipulates the working system date and also the consumer software is relying on it.
under "Images" take out the build image (hover in excess of the box name to get a context menu), eventually also the underlying base image
What I don't want is, lazy purchasers that don't insert the proper header facts to have the ability to bypass the cache by default. Thank with the contribution, nevertheless! I edited the question title to generally be more express.
There are two ways that I know of. The first is to tell the browser to not cache the page. Location the Reaction to no cache takes treatment of that, nonetheless as you suspect the browser will usually disregard this directive. The other strategy will be to set the day time of your response to a point Down the road.
I'm following here a definitive reference to what ASP.Internet code is required to disabled browsers from caching the page. There are numerous ways to influence the HTTP headers and meta tags and I have the impact different settings are required to obtain different browsers to behave properly.