Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //http://stackoverflow.com/questions/4480304/how-to-set-http-headers-for-cache-control
- //set headers to NOT cache a page
- header("Cache-Control: no-cache, must-revalidate"); //HTTP 1.1
- header("Pragma: no-cache"); //HTTP 1.0
- header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
- //or, if you DO want a file to cache, use:
- header("Cache-Control: max-age=2592000"); //30days (60sec * 60min * 24hours * 30days)
- //Check Varnish cache
- //http://www.isvarnishworking.com/
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement