Hi there,
I've build a admin module for a shop.
On one page, the administrator can upload an image and alter descriptions.
When (s)he presses "save", the data is stored in MySql and the user is redirected to the list. In the list (and database) all new info is updated. However, when we go back to the details.php?id=123 page (by clicking a link in the list), we see old content. The document is still in the cache.
However, the document is sent to the browser with the head(ers):
// PHP headers
header("Last-Modified: ".gmdate("D, d M Y H:i:s") . " GMT");
header("Expires: 0");
// HTTP 1.1 - begin
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", "no-cache", false); // required for certain browsers
// HTTP 1.1 - end private, must-revalidate, no-store, post-check=0, pre-check=0, max-age=0
// HTTP 1.0 - begin
header("Pragma: no-cache");
// HTTP 1.0 - end
// HTML head section
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
In other browsers, the page is not cached and the updated info is displayed. Only IE keeps it in the cache.
How can I "explain" IE that this page should never be cached ?
Of course I can expand the URL to something like ../detail.php?id=123&unique=asb, but, if the user hits the back button too often, the old page should also not be displayed.