我有一个网站https://royzez.com,I我正在使用.htaccess来利用浏览器缓存作为GT Metrix中提到的代码,但我仍然收到消息(未指定过期) . 这些图像来自CDN . 那么CDN服务器还有其他一些配置吗?如何解决这个问题 . 我正在使用的代码是`
ExpiresActive on
ExpiresDefault "access plus 1 month"
#CSS ExpiresByType text / css“access plus 1 month”
#Favicon(无法重命名!)和光标图片ExpiresByType image / x-icon“access plus 1 week”
#HTML ExpiresByType text / html“access plus 0 seconds”
#JavaScript ExpiresByType application / javascript“access plus 1 year”ExpiresByType application / x-javascript“access plus 1 year”ExpiresByType text / javascript“access plus 1 year”
#清单文件ExpiresByType应用程序/清单json“访问加1年”
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
#Media文件ExpiresByType audio / ogg“access plus 1 month”ExpiresByType image / bmp“access plus 1 month”ExpiresByType image / gif“access plus 1 month”ExpiresByType image / jpeg“access plus 1 month”ExpiresByType image / png“access plus 1个月“ExpiresByType image / svg xml”访问加1个月“ExpiresByType image / webp”访问加1个月“ExpiresByType视频/ mp4”访问加上1个月“ExpiresByType视频/ ogg”访问加上1个月“ExpiresByType视频/ webm”访问加1个月“
#Web字体
# Embedded OpenType (EOT)
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType font/eot "access plus 1 month"
# OpenType
ExpiresByType font/opentype "access plus 1 month"
# TrueType
ExpiresByType application/x-font-ttf "access plus 1 month"
# Web Open Font Format (WOFF) 1.0
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
# Web Open Font Format (WOFF) 2.0
ExpiresByType application/font-woff2 "access plus 1 month"
# Other
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
`
请帮助我解决这个问题我在互联网上搜索了一切我没有得到解决方案 . 非常感谢你,抱歉英语不好 .
1 回答
缓存策略似乎很好:https://www.dareboost.com/en/report/55b8bd890cf21c478235ce22
您从哪个测试地点进行测试?