WordPress 设置浏览器端缓存,加快访问速度

WordPress 设置浏览器端缓存,加快访问速度,在网站根目录 .htaccess 文件中添加以下代码:

#Expire Header

ExpiresActive on 

ExpiresByType text/css "access 1 month"

ExpiresByType text/plain "access 2 days"

ExpiresByType text/html "access 2 days"

ExpiresByType application/javascript "access 1 month"

ExpiresByType image/jpeg "access 1 month"

ExpiresByType image/x-icon "access 1 month"

ExpiresByType image/gif "access 1 month"

ExpiresByType image/png "access 1 month"

ExpiresByType image/ico "access 1 month"

ExpiresByType application/pdf "access 1 month"

ExpiresByType application/x-shockwave-flash "access 1 month"

ExpiresDefault "access 1 month"
温馨提示 : 非特殊注明,否则均为©李联华的博客网原创文章,本站文章未经授权禁止任何形式转载;IP地址:3.144.90.108,归属地:俄亥俄州Dublin ,欢迎您的访问!
文章链接:https://www.lilianhua.com/faster-access.html
Popup Image

通知

本站原则上是免费提供技术支持,但是服务器维护和运营成本高,可以实行自由赞助:赞助

Loading...