CMS  Version 3.9
styles.css.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::usingFeature("cache");
3 
4 $last_modified = Cache::get("css_cache_timestamp");
5 
6 header("Last-Modified: ".date('r', $last_modified));
7 header("Cache-Control: max-age=300, must-revalidate");
8 header("Content-Type: text/css");
9 header("Pragma: private");
10 header("Expires: " . date(DATE_RFC822,strtotime(" 2 day")));
11 
12 if(array_key_exists("HTTP_IF_MODIFIED_SINCE",$_SERVER))
13 {
14 
15  $if_modified_since=strtotime($_SERVER["HTTP_IF_MODIFIED_SINCE"]);
16 
17  if ($if_modified_since >= $last_modified)
18  {
19  header("HTTP/1.0 304 Not Modified");
20  exit();
21  }
22 }
23 
24 $content = Cache::get("css_cache");
25 header("Content-Length: ".strlen($content));
26 
27 echo $content;
28 ?>
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
$last_modified
Definition: styles.css.inc:4
if(array_key_exists("HTTP_IF_MODIFIED_SINCE", $_SERVER)) $content
Definition: styles.css.inc:24