문제

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