noderat
Member
Posted 5 years ago #
If your server is not already set up with mod_gzip you can always enable php's own compression by adding the tag <?php ob_start("ob_gzhandler"); ?> to the top of your index.php. Just add it to the require so it looks like: <?php ob_start("ob_gzhandler"); require('./wp-blog-header.php'); ?>
And if you have an abnormally large wp-layout.css, you can do it with that too. First of all you need to rename wp-layout.css to wp-layout.php, then add <?php ob_start("ob_gzhandler"); header("Content-type: text/css"); ?> to the top of your CSS file. Don't forget to change the @import in your index.php to point to the wp-layout.php file and not wp-layout.css.
Good luck!
Anonymous
Unregistered
Posted 5 years ago #
Changing the extension for the CSS file to PHP breaks CSS compliance when used with a <link> tag, not sure about the <style> tag import though.
You can also enable compression by checking the box in options.
firefox360
Member
Posted 5 years ago #
If your server is not already set up with mod_gzip you can always enable php's own compression
Allusion, we know that you are able to compress everything with a check mark in 'Options'. That method uses mod_gzip. Not all server has mod_gzip install, so this is an alternative method by using PHP's equivalent of gzip. About the name change to .php, i'm not absolutely sure about that, but I have a hunch that it does break the complience. You'll have to check W3C (http://www.w3.org) to fine out. Otherwise when running through validators, you will get errors.