Re: IIS 6.0 caching Image Files when we don't want it
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 08/07/04
- Next message: David Wang [Msft]: "Re: IIS replacing blanks"
- Previous message: winzin: "Re: Minimum Permission to run ISAPI Filter under IIS 6.0"
- In reply to: Robin Shaw: "IIS 6.0 caching Image Files when we don't want it"
- Next in thread: Robin Shaw: "Re: IIS 6.0 caching Image Files when we don't want it"
- Reply: Robin Shaw: "Re: IIS 6.0 caching Image Files when we don't want it"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Aug 2004 18:18:47 -0700
It sounds like your 3rd party component and your application is incompatible
with caching because it is dynamically creating images that end up with the
same URL (filename is based on session ID, which probably stays the same
throughout the session in question) but DOES NOT have the same content. But
there is no way for a web server to know the image was created dynamically
since you're accessing it like a static file.
If the 3rd party component dynamically creates an image with a unique
filename and the URL which retrieves it stays constant, after 3 requests to
the same URL within 10 seconds, the URL's content will be automatically
cached by IIS. This is absolutely reasonable because HTTP is stateless, so
when someone accesses a URL like "/images/foobar12345.gif" , it is expected
that if you access the exact same URL 30 seconds later, the same content
should come back. If that is not the case, it is the responsibility of the
component to declare itself "not cache friendly".
So, it looks like your application is incompatible with caching. The
resolutions I can think of are:
1. Keep caching and use an application that is compatible with caching
2. Disable caching
I think it's the static file response cache that is conflicting for your
configuration:
CSCRIPT %SYSTEMDRIVE%\inetpub\adminscripts\ADSUTIL.VBS SET
W3SVC/DisableStaticFileCache 1
NET STOP /y HTTP & NET START W3SVC
This will stop the static file cache from working.
Bottom line:
I do not think the problem is "IIS6 caching Image Files when we don't want
it" -- the problem is that your application is not telling IIS6 that it is
not cache friendly -- thus the responsibility is on the user to disable any
caches that conflict with the application.
-- //David IIS This posting is provided "AS IS" with no warranties, and confers no rights. // "Robin Shaw" <robin.shaw@nospam.oboron.com> wrote in message news:OzRSB$5eEHA.632@TK2MSFTNGP12.phx.gbl... Hi We're migrating an application from IIS 4.0 to IIS 6.0 on Win2003 Server. The application uses a 3rd party component to dynamically create images and assigns the filename to the Users SessionID. The page displays the correct image for the first 3 or 4 times but from then on serves up the last image all the time. I've changed the browser settings to check the page every page visit. We do not use a proxy server and when accessing the image directly from the server it serves up the last image not the latest image. Howerver, when viewing the image from explorer on the server the 3rd party component creates the correct image. It's as if the server is caching the image but we can't understand why it works for the first 3 or 4 hits and then stops working. We've set enable content expiration to immediate on the web site as well and added Cache-Control : no-cache to the headers. Anyone else encountered this or has a resolution would be much appreciated. Thanks Robin
- Next message: David Wang [Msft]: "Re: IIS replacing blanks"
- Previous message: winzin: "Re: Minimum Permission to run ISAPI Filter under IIS 6.0"
- In reply to: Robin Shaw: "IIS 6.0 caching Image Files when we don't want it"
- Next in thread: Robin Shaw: "Re: IIS 6.0 caching Image Files when we don't want it"
- Reply: Robin Shaw: "Re: IIS 6.0 caching Image Files when we don't want it"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|