Encoding your files at the server level for faster pages

Have you ever found your self waiting for a web page to load? Often times reminiscent of your AOL dial-up days? If so, look no further. Some simple .htaccess or server modification will allow your site to zip along and load +30% faster!

# DEFLATE by type - html, text, css, xml
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml
# DEFLATE by type - javascript
AddOutputFilterByType DEFLATE application/x-javascript application/javascript text/javascript text/x-js text/x-javascript
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml


Posted: November 26th, 2012
Categories: code, tutorial
Tags: ,
Comments: 1 Comment.
Comment from fleurupj - March 16, 2014 at 4:01 am

Elan Trybuch | News – Thoughts on Front End Engineering, Visual ?sthetics, UI & UX, Thank you so much for wonderfully answering my question! I found it clear and understandable and feel that now I’ll have confidence to block completed projects. You have a gift to write so clearly!