Ads

Monday, 18 November 2013

Faster Page Load Times / Bandwidth Saver .htaccess

This basically checks to see if mod_czip.c is found and if it is it will compress the files for you so they are faster to send to the browser. This supposedly speeds up download times 35-40%, and then the file size should supposedly go down to 55-65%.

 #Gzip  
 <ifmodule mod_deflate.c>  
 AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript  
 </ifmodule>  
 #End Gzip  

OR


 <IfModule mod_gzip.c>  
   mod_gzip_on    Yes  
   mod_gzip_dechunk Yes  
   mod_gzip_item_include file   \.(html?|txt|css|js|php|pl|jpg|png|gif)$  
   mod_gzip_item_include handler  ^cgi-script$  
   mod_gzip_item_include mime   ^text/.*  
   mod_gzip_item_include mime   ^application/x-javascript.*  
   mod_gzip_item_exclude mime   ^image/.*  
   mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*  
 </IfModule>  

No comments:

Post a Comment