Pages

Thursday, October 3, 2013

Page Speed-Leverage browser caching

Make sure that Browser cache expire time should be at least 
1 week for consistent things. This can be reduced files that change constantly.
 
To add this add following like structure in .htaccess
(preferably root can be changed to taste in some cases)
 
 
 ## EXPIRES CACHING ##  
 ExpiresActive On  
 ExpiresByType image/jpg "access plus 1 year"  
 ExpiresByType image/jpeg "access plus 1 year"  
 ExpiresByType image/gif "access plus 1 year"  
 ExpiresByType image/png "access plus 1 year"
 ExpiresByType text/javascript "access plus 1 month"
 ExpiresByType text/css "access plus 1 month"
 ExpiresByType application/pdf "access plus 1 month"  
 ExpiresByType text/x-javascript "access plus 1 month"  
 ExpiresByType application/x-shockwave-flash "access plus 1 month"  
 ExpiresByType image/x-icon "access plus 1 year"  
 ExpiresDefault "access plus 2 days"  
 ## EXPIRES CACHING ##  

No comments:

Post a Comment