GZIP Javascript and CSS with PHP
From Zoelife4U Wiki
Synopsis
We get alot of requests for mod_gzip or mod_deflate and we just can't offer these as they would be too resource heavy on the servers, however there are some low resource alternatives that may be taken. Also see this article for some extra ideas.
The Goods
Click on the View Plain link to make the code safe for copy and paste.
In the .htaccess file put:
In php.ini around line 391 of a default file put:
In php.ini down about line 117 put:
Now create two files called gzip-css.php and gzip-js.php.
gzip-css.php:
gzip-js.php: