Created
August 28, 2013 18:44
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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