Increase Web Site Performance using PHP and GZIP You can use PHP to return compressed content. Give your HTML file a .php extension and add this code to the top: If you are using Apache Web Server, there are also has two additional compression options:
Deflate is quick and works; use mod_gzip for more control. In either case, Apache checks if the browser sent the “Accept-encoding” header and returns the compressed or regular version of the file. However, some older browsers may have trouble and there are special directives you can add to correct this. |
||