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


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


Relevant Pages

  • Re: Caching of websites - does it exist on SBS2003?
    ... To avoid the issue you can turn off caching in the Internet ... Resetting his browser did not help. ... That would imply the local system, not the server. ... Set the cache to 0, close IE, open and set the cache to something ...
    (microsoft.public.windows.server.sbs)
  • Re: disable caching of DNS resolution
    ... Are you asking about the system DNS client cache or the DNS server cache? ... For the DNS server cache make a registry entry to set the Maximum Cache Time ... Function: Set maximum caching TTL. ...
    (microsoft.public.win2000.dns)
  • Re: ISA Not Caching
    ... cache everything including windows updates. ... Now with our new ISA 2004 server ... server caching and nothing is being cached. ...
    (microsoft.public.isa.configuration)
  • Re: Does PHP "cache" scripts?
    ... As I say - it works perfectly in all browsers on my dedicated server. ... Exactly the same script - just a different server - so I am assuming it ... MySQL can be configured to have a cache, but I don't know much about that. ... It could be anything between the server and your system that's caching the page. ...
    (comp.lang.php)
  • Re[2]: [PHP] dynamic -> static
    ... As I wrote already this issue is mainly because of search engines ... incompatibility with dynamic content sites (to be more exact - with ... You can cache your code using PHP Accelerator or Turck ... MM> implementing a caching layer between your application and your database. ...
    (php.general)

Loading