2 つの部分からなる質問 (部分は密接に関連しています): IIS7 が採用している既定の OOTB ETag ポリシーでは、ページを移動するときに If-None-Match/304 インタラクションが表示されないのはなぜですか?
たとえば、空のキャッシュ要求に対して返されるヘッダーは次のとおりです。
Content-Type image/png
Last-Modified Thu, 03 Dec 2009 15:51:56 GMT
Accept-Ranges bytes
Etag "a8a0628a3074ca1:0"
Server Microsoft-IIS/7.0
X-Powered-By ASP.NET
Date Tue, 22 Dec 2009 19:47:36 GMT
Content-Length 1780
...そして、ページへのその後のアクセスは、画像の 304 ラウンドトリップを生成しませんか?
また、IIS7 のデフォルトのapplicationHostファイルには、次の (1) があります。
<caching enabled="true" enableKernelCache="true">
</caching>
enableKernelCache ='true'はすべての静的ファイルに拡張され、カーネル ポリシーとしてCacheUntilChangeを付与するために拡張機能を明示的に登録する必要がなくなりますか(2):
<caching>
<profiles>
<add extension=".gif" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".png" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".js" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".css" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".jpg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
</profiles>
</caching>
(1) %systemroot%\System32\inetsrv\config\applicationHost.config
(2) http://labs.episerver.com/en/Blogs/Per/Archive/2009/3/Configuring-cache-expiration-on-IIS-7/