Question

I have a website which extensively uses files which are static like Jquery library, images and some other functionality JS files.

So, I wish to set infinite expiry time for those resources so that those can be easily retrieved from users cache. This will enhance his experience and reduce the loading file

Can anyone suggest how to do the same using .htaccess or any other method.

Thanks !

Was it helpful?

Solution

http://httpd.apache.org/docs/current/mod/mod_expires.html You might be looking for the ExpiresByType directive? I suppose, setting it to 10 years will be sufficient. However, be careful with updates to those files then.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top