Mobile app version of vmapp.org
Login or Join
Annie201

: .htaccess and browser caching I ran across these suggested htaccess edits. Is this a good practice? Is this something I should implement on my wordpress site?: <IfModule mod_expires.c> ExpiresActive

@Annie201

Posted in: #Cache #Htaccess

I ran across these suggested htaccess edits. Is this a good practice? Is this something I should implement on my wordpress site?:

<IfModule mod_expires.c>
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/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"
</IfModule>

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

2 Comments

Sorted by latest first Latest Oldest Best

 

@Welton855

yes, this is great practice.

I would also encourage you to checkout appcache. If you add one year to any file, it's good to make it browser-ready (AddType text/cache-manifest .appcache)

10% popularity Vote Up Vote Down


 

@Kevin317

This is definitely good practice. Having the browser cache pages and resources is a great way to speed up page loading as well as reduce bandwidth usage on your server.

I recommend checking out Google's PageSpeed for more tips on how to improve the performance of your web pages.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme