php header
Posted: Sun Aug 23, 2015 8:05 pm
2 items for the header, not sure which should be first or does it matter?
Code: Select all
<?php
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 7;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpStr);
?>
<!-- ETag allows a search engine the ability to identify page changes easily -->
<?php header("ETag: " . sha1(date("YmdHis", getlastmod()))); ?>