質問

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 !

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top