booger wrote:
Actually the best way to gzip your css is just to create a file named 'template_css.php' and add the following code into it:
Code:
<?php
ob_start ("ob_gzhandler");
header("Content-type: text/css");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>
<?php include ('template_css.css'); ?>
Then change your template to reflect the name as stated before:
Code:
<link rel="stylesheet" href="/templates/<name-of-template>/css/template_css.php" />
That way you can still edit your css file through the admin panel.
What about if we have the include some special css like this??:
<link rel="stylesheet" href="templates/beez/css/template.css" type="text/css" />
<link rel="stylesheet" href="templates/beez/css/position.css" type="text/css" media="screen,projection" />
<link rel="stylesheet" href="templates/beez/css/layout.css" type="text/css" media="screen,projection" />
<link rel="stylesheet" href="templates/beez/css/print.css" type="text/css" media="Print" />
NOTICE: the mediawhen we use just include then the special characteristic of the css is compromised.. any alternative or suggestion? and if i first want to do a small test then how do i come to notice that the zipping has occurred and the page is lighter. how do u weigh pages. is there any tool available? pls help me as i m a bit novice :|