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地址:44.201.97.0,欢迎您的访问!

温馨提示 : 非特殊注明,否则均为李联华的博客原创文章,本站文章未经授权禁止任何形式转载
文章链接:https://www.ooize.com/faster-access.html

订阅文章

在下面输入您的电子邮件地址以订阅我们的文章

留下评论

Loading...