到期未指定"根据Gtmetrix

时间:2015-07-08 13:13:17

标签: php .htaccess xampp

我有一个网站https://royzez.com,I正在使用.htaccess来利用浏览器缓存作为GT Metrix中提到的代码,但我仍然收到消息(未指定过期)。这些图像来自CDN。那么CDN服务器还有其他一些配置吗?如何解决这个问题。 我正在使用的代码是`

ExpiresActive on
ExpiresDefault                                      "access plus 1 month"

#CSS     ExpiresByType text / css"访问加1个月"

#Favicon(无法重命名!)和光标图像     ExpiresByType image / x-icon"访问加1周"

#HTML     ExpiresByType text / html" access plus 0秒"

#JavaScript     ExpiresByType应用程序/ javascript"访问加1年"     ExpiresByType应用程序/ x-javascript"访问加1年"     ExpiresByType text / javascript"访问加1年"

#清单文件     ExpiresByType应用程序/清单+ json"访问加1年"

ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
ExpiresByType text/cache-manifest                   "access plus 0 seconds"

#Media文件     ExpiresByType音频/ ogg"访问加1个月"     ExpiresByType image / bmp"访问加1个月"     ExpiresByType image / gif"访问加1个月"     ExpiresByType image / jpeg"访问加1个月"     ExpiresByType image / png"访问加1个月"     ExpiresByType image / svg + xml"访问加1个月"     ExpiresByType image / webp"访问加1个月"     ExpiresByType视频/ mp4"访问加1个月"     ExpiresByType视频/ ogg"访问加1个月"     ExpiresByType视频/ webm"访问加1个月"

#Web fonts

# 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 个答案:

答案 0 :(得分:0)

缓存策略似乎很好: https://www.dareboost.com/en/report/55b8bd890cf21c478235ce22

您从哪个测试地点开始测试?

相关问题