Return to Snippet

Revision: 5118
at February 12, 2008 14:08 by johnself

Initial Code
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";

Initial URL

Initial Description
CSS files for larger sites can become pretty large themselves. Gzipping or compressing these files has shown to provide a reduction in the neighborhood of 70-80% of the original file size, a fairly significant 'weight loss'.

Initial Title
Gzipping your CSS

Initial Tags
css, php

Initial Language