How to make Firefox, DO NOT cache my webpage

I have this page, name it index.php

index.php has a list of users and a user delete button. This will lead them to removeUser.php

And the last line removeUser.php should go back to index.php

But in Firefox, it still looks the same, an ordinary user will not know how to perform a hard update or clear the cache each time a page is loaded manually.

I tried

 CACHE-CONTROL NO-CACHE,NO-STORE 

and

 PRAGMA NO-CACHE,NO-STORE 

I even tried setting EXPIRY 0 in META tags, none of them help. While all this works fine in Chrome and other browsers, it is just Firefox that has this problem.

These are my headers requested by @alex

 http://localhost/xChange/home.php GET /xChange/home.php HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://localhost/xChange/home.php Cookie: laobgcidne=yes; eambacidle=inaresh.online@gmail.com Cache-Control: max-age=0 HTTP/1.1 200 OK Date: Fri, 10 Dec 2010 08:28:25 GMT Server: Apache/2.2.11 (Win32) PHP/5.3.0 X-Powered-By: PHP/5.3.0 Cache-Control: no-cache, must-revalidate Expires: Sat, 26 Jul 1997 05:00:00 GMT Content-Length: 6130 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html 
+4
source share
3 answers

Send expires header for past date.

Example

 header("Cache-Control: no-cache, must-revalidate"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 

Source

Update

Your headlines look good. I do not know what Firefox does.

You can do this from the link to make sure that it always downloads a new copy.

 <?php $link = 'home.php'; ?> <a href="<?php echo $link . '?m=' . filemtime($link); ?>">Home</a> 
+11
source
+3
source

Just press Ctrl + F5 for a hard refresh on your browser page, it will delete the cache of the current page and load a new editable page.

0
source

All Articles