Re: IIS 6.0 caching Image Files when we don't want it

From: Robin Shaw (robin.shaw_at_nospam.oboron.com)
Date: 08/09/04


Date: Mon, 9 Aug 2004 15:15:25 +0100

Thanks for this David

The exact same application was migrated from IIS 4.0 running on NT Server
4.0 to Win 2003 IIS 6.0. Does this mean IIS 4.0 wasn't caching properly?

Disabling static file cache does indeed solve the problem but affects other
sites on the server. Is it possible to configure IIS to not cache static
files on a site by site basis?

Robin

"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:OPiii9BfEHA.3520@TK2MSFTNGP10.phx.gbl...
> 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
>
>
>



Relevant Pages

  • Re: IIS 6.0 caching Image Files when we dont want it
    ... I've disabled static file caching on the specific folder where the images ... > The exact same application was migrated from IIS 4.0 running on NT Server ... > Disabling static file cache does indeed solve the problem but affects ...
    (microsoft.public.inetserver.iis)
  • Re: Corruption with VFP 8
    ... Directing the temp files locally simply reduces the burden on your network. ... The operating system caching could be a problem. ... 2003 Server: ... improperly reported as table corruption. ...
    (microsoft.public.fox.helpwanted)
  • Re: Multiple instances of BIND at startup
    ... The caching name server will see tens of thousands of our clients requests to use as their DNS lookup, which will perform recursive lookups that we are not authoritative for. ... recursion yes; ...
    (freebsd-questions)
  • Re: Server accelerator options: Squid, apaches built-in web caching or hardware "solutions"
    ... I have read about Squid as surrogate server, ... caching and is returning the appropriate caching information). ... layer which will add an additional hop to each request. ...
    (comp.infosystems.www.servers.unix)
  • Re: Corruption with VFP 8
    ... The operating system caching could be a problem. ... 2003 Server: ... each user has a shortcut to a network folder that contains ... 321550 How to optimize Visual FoxPro applications while using Norton ...
    (microsoft.public.fox.helpwanted)