Why won't my pages stop caching?

I use this header (see below). So why do my pages keep caching in IE ???

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <META NAME="MSSmartTagsPreventParsing" CONTENT="True">
 <META HTTP-EQUIV="Expires" CONTENT="0">
 <META HTTP-EQUIV="Pragma" CONTENT="No-Cache">
 <META HTTP-EQUIV="Cache-Control" CONTENT="No-Cache,Must-Revalidate,No-Store">
 <META NAME="Robots" CONTENT="NoIndex,NoFollow">
 <META ondragstart="return false" onselectstart="return false" http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

THE PROBLEM IS SOLVED !!! Instead of .html or .htm use .php and use a php header like this:

<?php
 header("Cache-Control: no-cache, must-revalidate");
 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
 header("Cache-Control: no-cache, no-store, must-revalidate");
 header("Pragma: no-cache");
?>
+5
source share
1 answer

In addition to other suggestions, try adding a dynamic value to the page request, which will have a better chance of not caching.

(i.e. / foo.html? a = 9585874034854 (or era or something else, like dynamic).

In addition, your header requires: Cache-Control: no-cache, no-store

This indicates that the system does not cache it or even stores it in the cache.

0

All Articles