This function is described in this article as a solution to disable page caching. It is suitable for IE and Firefox browsers. The rational use of caching in Web development can effectively improve website performance, however, in some cases, cache may cause many problems. For example, the cache may cause repeated data submission and incorrect display of Verification Code images. In this case, we need to disable the page cache function.
Our common practice is to send a "no-Cache" command, but in actual use, we found that this command is valid for IE, but not for Firefox, this is because Firefox does not cache HTTPS pages but will still Cache HTTP pages. This is a bug in Firefox. The solution is simple, that is, replacing no-Cache with no-store, send no-store and no-Cache commands at the same time
In Asp.net, add the following to the page that does not require Caching:Code
Response. cache. setcacheability (system. Web. httpcacheability. nocache );
Response. cache. setnostore ();