Skip to content

Instantly share code, notes, and snippets.

@curiositry
Created August 28, 2013 18:44
Show Gist options
  • Save curiositry/6369689 to your computer and use it in GitHub Desktop.
Save curiositry/6369689 to your computer and use it in GitHub Desktop.
For those using PHP as a CSS preprocessor, this snippet sets the headers and also enables gzipping.
<?php ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment