Bang~ It is faster than just minify the content. But so far I just tested with Apache server as it is most used http server in my projects. I just added the following code in my .htaccess file
# compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript
By the way, you may want to enable the mod_deflate.so in your httpd.conf to make it work.
Anyway, have a look at How To Optimize Your Site With GZIP Compression. It really gives a heads up. So you may want to have a try on your projects.
0 comments :
Post a Comment