web.config 文件未被 Google PageSpeed Insights 读取

web.config file not being read by Google PageSpeed Insights

我已经通读了这里的答案,但仍然卡住了:IIS7 Cache-Control

我的网站根目录中有以下 web.config.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<system.webServer>

<staticContent>

<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>

</staticContent>

</system.webServer>

</configuration>

此 web.config 文件的目的是通过 Google PageSpeed Insight 'leverage browser caching' 测试。我正在使用 Windows Plesk 托管,因此不能为此使用 .htaccess 文件。

无论我如何尝试格式化 web.config 文件的内容,Google 似乎都无法识别正在发生的任何形式的浏览器缓存。我不确定它是否只是 Google,或者它是否意味着我页面上的图像和其他静态资源正在缓存中。有没有简单的方法来检查这个?

任何人都可以看到我的 web.config.xml 内容中可能导致问题的任何问题吗?或者除了将其粘贴到我的网站的根目录之外,我还需要做些什么吗?

文件名应为 web.config 而不是 web.config。xml *.config 已经是 xml 类型的文件