让浏览器使用js文件的缓存版本(从服务器端)最好的方法是什么?
发布于 2008-11-23 16:42:05
发布于 2008-11-22 08:28:04
或在.htaccess文件中
AddOutputFilter DEFLATE css js
ExpiresActive On
ExpiresByType application/x-javascript A2592000
发布于 2008-11-22 08:32:47
在您的Apache .htaccess文件中:
#Create filter to match files you want to cache
<Files *.js>
Header add "Cache-Control" "max-age=604800"
</Files>
我也在这里写过:
http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/
https://stackoverflow.com/questions/311062
复制相似问题