开发者

Determining if IE 8 is actually caching the resources of my site

开发者 https://www.devze.com 2023-03-14 20:30 出处:网络
I am currently working on a site using Asp.net and IIS 7.5. I have configured IIS using the following:

I am currently working on a site using Asp.net and IIS 7.5. I have configured IIS using the following:

<caching>
      <profiles>
        <add extension=".jpg" policy="CacheUntil开发者_如何学运维Change" kernelCachePolicy="CacheUntilChange" />
        <add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
        <add extension=".swf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
        <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
        <add extension=".txt" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
        <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" />
      </profiles>
</caching>

Firefox and Chrome are reporting that they are getting the cacheable files from the local cache. However I was using HttpWatchStudio, screen below, to monitor IE 8 and noticed that the output report indicated that the files served off my IIS server were not cached. The cached files in question in the image are from google.

Is there a method to double check that IE is in fact caching the files? Should I just check the Temp Internet folder on my local machine?

Determining if IE 8 is actually caching the resources of my site


Probably the most sure-fire way to check is to fire up Wireshark or a similar packet caturing program and see what request the browser is making to the server.


I updated the my caching profile then inspected the traffic again. The content was now being cached locally in IE.

<caching>
    <profiles>
        <add extension=".txt" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".swf" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
        <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" location="Client" />
    </profiles>
</caching>
0

精彩评论

暂无评论...
验证码 换一张
取 消