2012-09-21 07:47:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is a system-generated PHP script that performs header management for
|
|
|
|
* the statically cached content given below.
|
|
|
|
*
|
2012-09-25 10:02:26 +02:00
|
|
|
* @package staticpublisher
|
2012-09-21 07:47:26 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
define('MAX_AGE', '**MAX_AGE**');
|
|
|
|
define('LAST_MODIFIED', '**LAST_MODIFIED**');
|
2013-06-11 11:34:43 +02:00
|
|
|
define('CONTENT_TYPE', '**CONTENT_TYPE**');
|
2012-09-21 07:47:26 +02:00
|
|
|
|
|
|
|
if(MAX_AGE > 0) {
|
|
|
|
header("Cache-Control: max-age=" . MAX_AGE);
|
|
|
|
header("Pragma:");
|
|
|
|
} else {
|
|
|
|
header("Cache-Control: no-cache, max-age=0, must-revalidate");
|
|
|
|
}
|
|
|
|
|
|
|
|
header("Expires: " . gmdate('D, d M Y H:i:s', time() + MAX_AGE) . ' GMT');
|
|
|
|
header("Last-modified: " . gmdate('D, d M Y H:i:s', strtotime(LAST_MODIFIED)) . ' GMT');
|
2013-06-11 11:34:43 +02:00
|
|
|
header('Content-Type: '.CONTENT_TYPE);
|
2012-09-21 07:47:26 +02:00
|
|
|
|
|
|
|
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
|
|
|
|
if(strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= strtotime(LAST_MODIFIED)) {
|
|
|
|
header("Last-modified: " . gmdate('D, d M Y H:i:s', strtotime(LAST_MODIFIED)) . ' GMT', true, 304);
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
**CONTENT**
|