Last updated on May 23rd, 2016 at 04:06 pm

VN:F [1.9.22_1171]
Rating: 7.8/10 (4 votes cast)

Prevent caching Firefox Internet Explorer Using no-cache

You can prevent any caching in IE by simply setting this response header:

Also check Disable Browser Back Button

Cache-Control: no-cache
Pages that use this header aren’t stored in the cache and IE will always reload them from the server; even if you use the Back button to reach them.

header("Cache-Control: no-cache, must-revalidate"); ?>

These two header values can be combined to get the required effect on both IE and Firefox:

Cache-Control: no-cache, no-store

To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document. For example:


< /HEAD>

< /HTML>

This is an example of where to place the second header section


< /HEAD>

< /HTML>

Note: For the tag:

<meta http-equiv="expires" content="-1">

-1 means do not cache and expire straight away.

Therefore, when the user click the Back button, they will get the warning: Page has Expired – Please Refresh or resubmit information etc…. in Internet Explorer.

Note: these meta tags need to be within the HEAD section. This is very important.

VN:F [1.9.22_1171]
Rating: 7.8/10 (4 votes cast)

Leave a Reply

Your email address will not be published. Required fields are marked *