One of the best ways to make websites faster is to use gzip compression on your files. Many CMSs have options (or plugins) that allow automatic compression. But what if your site doesn’t use a fancy pants CMS? Then what, huh?
Actuall the solution is pretty simple. All you have to do is change your file extension from .html (or .htm) to .php and add the following lines of code to the very top of the page:
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], ‘gzip’)) ob_start(“ob_gzhandler”); else ob_start(); ?>
Make sure you delete the .html version of the file from the server and then……
Almost 70% compression!