Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compression
#2
We can do the same with css template:

- Rename default.css to default.css.php
- Add to top of this file:
Quote:<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
header ("content-type: text/css; charset: UTF-8");
header ("cache-control: must-revalidate");
$offset = 60 * 60;
$expire = "expires: " . gmdate ("D, d M Y H:iConfused", time() + $offset) . " GMT";
header ($expire);
?>
- Modify file template.php, on line 17 to:
Quote:<link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/default.css.php" media="all" />
Reply


Messages In This Thread
Compression - by siot - 2010-06-21, 17:50:50
Compression - by siot - 2010-06-21, 18:00:11
Compression - by Zegnåt - 2010-06-23, 21:33:25



Users browsing this thread: 1 Guest(s)