There are a number of methods for this, with PHP or with the Apache Gzip module. To enable Gzip compression for PHP pages you have to set zlib.output_compression to On, but that doesn’t work on CSS and javascript files. For those files you could use the Apache Gzip module, but what if you don’t have that module because you have shared hosting?
Related Submissions:
- Compress PHP, CSS, JavaScript & Optimize Website Performance. Bandwidth control is an important task to be followed when your traffic is increasing. With limited monthly bandwidth hosting, your site may run out of...
- GZip files with .htaccess and PHP There are many ways to GZip files, however here is a practically foolproof way to apply GZip to all html, css, js, and php files...
- Minify - Combine & Compress CSS or Javascript Files Minify is a PHP5 app that can combine multiple CSS or Javascript files, compress their contents (i.e. removal of unnecessary whitespace/comments), and serve the results...
- Use PHP to Gzip and Optimize CSS Files Use PHP to optimize and gzip CSS files resulting in smaller download size and fewer HTTP requests. I was able to reduce the size of...
- GZip Files with .htaccess and PHP Many hosts have a set bandwidth clients can use. In this day and age, files are getting larger and heavier, but bandwidth costs aren’t getting...