Iis caching javascript files


















Search related threads. Remove From My Forums. Answered by:. Archived Forums. Troubleshooting for IIS 7 and above. Sign in to vote. A cache is a temporary storage area. For example, the files you automatically request by looking at a Web page are stored on your hard disk in a cache subdirectory under the directory for your browser. When you return to a page you've recently looked at, the browser can get those files from the cache rather than the original server, saving you time and saving the network the burden of additional traffic.

This helps to improve performance because the script used to generate dynamic output does not need to run for each request. The cache is able to vary the output that is cached, based on query string values and HTTP headers that are sent from the client to the server. That's where the ol' filename-based versioning is so useful : Let me know how your test goes Interesting stuff, Brian.

That's a surprising result, but it makes sense. I assume it works the same way with Javascript? It's not a specific result for graphics?

One think I would point out though, that the second result only seems to hold during a single browser session. When I shut IE6 down and visited again, the browser issued s. That indicates to me that if the user shuts down the browser and returns later, the "touch" will work because of the s. May 15, Scott -- That's interesting I tried closing my browser I actually had a reboot, too and tried connecting to my expire test page Even if I set IE6 to check for new versions on each request, it still didn't request it unless I hit F5.

There's obviously a setting somewhere you and I have different : I'm not sure if the same behavior is true for Javascript, it may not be. But if there's anything I learned, I never rely on the client. Even between the two of us there's some differences in behavior that could be disasterous relatively speaking, of course if clients were so unpredictable. It would be nice to have a very clear standard for cacheability, wouldn't it?

But, overall, I do agree with the browser not re-requesting the file. Have you used Fiddler with Firefox? I haven't done that yet not sure how easy it is to configure One quick hack that you might find useful for forcing file reloads without having to delve into IIS settings is to tag a unique querystring onto the end of the URL. Referring to "myScript.

This works by adding timestamp into the path, IIS will treat this request as a unique file and force-load a new version to the browser - works just as well for graphics.

This is an example from an ASP page, I'm sure there is an alternative technique for any server-side scripting language. I'll usually use this technique during development to prevent my browser from displaying old versions of files I've been workign on, then stripping out all the preventCache code when the site goes live. Caching your content in kernel mode lets you speed Web site performance. Failed Request Event Buffering FREB is the best way to find out whether or not your request gets cached; you can also find out why a request is not getting cached.

You can set the output cache to cache only your default page the most frequently requested page :. Create a file called default.

In the Actions menu on the right, click Switch to feature view. Every setting that you configure is now only applied to the default document. Select Kernel-mode caching , select At time intervals , enable Monitor cached files, and then type a time interval, such as Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful?

Please rate your experience Yes No.



0コメント

  • 1000 / 1000