Apache Compression

Actually, when I worked out with GWT Code Splitting, I still not satisfied with the result.
I know the web browser support content compression so a gave it a look.I chose to use the most simple solution, Apache compression. I just need to set .htaccess configuration and copy to your web folder.

Steps :

1. Enable Apache mod_deflate. mod_gzip is better but I don't have the extension. Open Apache configuration file and turn on the settings.

LoadModule deflate_module modules/mod_deflate.so

2. Create .htaccess file and paste these configuration. I want to compress all files with js, css, html, htm and php extensions.


<FilesMatch "(?i)^.*\.(js|css|html|htm|php)$">
SetOutputFilter DEFLATE
</FilesMatch>

3. Restart Apache. Done.

Try to open your web and use firebug to see your file downloads.
I was successfully, reduce the file download from 600Kb (After GWT code splitting) to 250Kb. So the total I saved around 800Kb and speed up my system.

0 comments:

 
Copyright © peyotest