I'm unsure which setting the browser will abide by, but it's unlikely being reliable concerning browsers and versions.
All requests get routed via default.aspx first - so assuming you may just pop in code at the rear of there.
Right after redirecting on ActionFilterAttribute event the implications of clearing all headers are losing all session data and info in TempData storage. It truly is safer to redirect from an Action or don't clear headers when redirection is taking place.
Even though you are making use of nocache, the ETag header isn't really eradicated, since it works in a different way. It's generated at the conclusion of the request and could be another source of unintended caching. So as to handle it you have two alternatives.
Unsure if my respond to sounds basic and Silly, and perhaps it has previously been known to you considering that long time in the past, but given that preventing another person from working with browser back again button to check out your historical pages is one of your targets, You may use:
Mother in Law has overstayed her schengen customer visa by nine days. I am implementing to the same visa this year, what must we take treatment of?
I found the online.config route useful (attempted to incorporate it to The solution but doesn't manage to have been accepted so putting up here)
Why is the number of Marie Curie postdoctoral fellowships in mathematics significantly lower than in other topics?
For protection reasons we do not want specific pages within our application being cached, at any time, by the world wide web browser. This must work for at least the following browsers:
But that may fail if e.g. the end-user manipulates the running system date and the customer software is relying on it.
Bear in mind that it is more info actually difficult to force the browser to disable caching. The best you are able to do is offer tips that most browsers will honor, ordinarily within the form of headers or meta tags.
If you are an experienced developer is up to you to make a choice from a dependency and code - I provided each of the headers in my solution This is why. FYI: perhaps nocache is one of the several npm libraries without dependencies and its creator is actually a protection expert.
Should you be making use of MVC4+ bundling and minification, you'll want to maintain the default cache durations for scripts and stylesheets (very long durations, Because the cache gets invalidated based over a change to a unique URL, not based on time).
1 The answers here are all sad. I'd insert my very own, but This is certainly shut. According to MDN: developer.mozilla.org/en-US/docs/Website/HTTP/Headers/Cache-Control you are doing in actual fact most likely wish to use as within the question.