test php disabled caching
Posted
by
user1691389
on Stack Overflow
See other posts from Stack Overflow
or by user1691389
Published on 2012-12-17T22:56:40Z
Indexed on
2012/12/17
23:03 UTC
Read the original article
Hit count: 168
My site had a problem in that certain browsers (especially opera and gecko) were "over-caching" (caching far too much for my taste).
I've just added the following PHP snippet to hopefully disable caching in all browsers:
<?php
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>
Question: How would you test this out, to make sure it actually works?
© Stack Overflow or respective owner