 |
|
 |
|
Next: Free email
|
| Author |
Message |
External

Since: Mar 30, 2004 Posts: 6
|
(Msg. 1) Posted: Wed Nov 23, 2005 10:11 pm
Post subject: Static File Caching at Server Side Archived from groups: microsoft>public>inetserver>iis (more info?)
|
|
|
I have been struggling with this for years, and have recently become
determined to find a solution for this. If anyone has *any* ideas about
this, please offer your suggestions.
Basically, I am having problems with static files -- specifically CSS -- not
being instantly updated when changes are made. For example, I am working on
a CSS file for my site, so I am making some trial-and-error changes,
applying them and then refreshing the page to see the results. But the
problem is, unless I wait X amount of time between requests (it seems to be
TTL of about 30 seconds), the old version still pulls up. I can even go to
a new computer that has never visited the site after immediately making
changes, and it still pulls up the old version.
I have read various articles and newsgroup postings regarding this. Some
suggest disabling memory cache or shortening the object cache ttl. First of
all, this is not an option -- I want static files cached, I just want it to
go get the latest version when changes are made, without having to wait 30
seconds between requests. Second, I did try it just to rule that out, and
it didn't seem to have an effect -- though I didn't test too thoroughly as
this was a production box, and I didn't want it hitting the HD that much for
static files (and that setting is, unfortunately, an OS-level setting).
I have also tried enabling content expiration on this particular CSS file,
but that had zero effect. I also tried adding "no cache" content headers
(Cache-Control: private, no-cache, must-revalidate) for this file, but this
also had zero effect. I did verify that the CSS is not being cached locally
now (my Temporary Files folder never has the CSS file after this content
header is added) -- but it is still pulling the old version if I request
within 30 seconds of the last request.
This also is not an issue of proxy caching, as there are no proxy servers
between the server and client.
The thing is, I have had this same exact problem on *several* sites over the
years -- both ASP sites and ASP.NET sites. I believe my sites have always
run on IIS 5.0 (Windows 2000).
I don't understand why IIS would be configured so that it would completely
ignore the fact that a static file has a new version, and still serve up the
old version.
If you need any additional info, let me know. I posted a similar topic on
this group yesterday, but have since made new discoveries, so I wanted to
start a new post w/ this new info.
Thanks in advance for any light you can shed on this mystery.
Jerad >> Stay informed about: Static File Caching at Server Side |
|
| Back to top |
|
 |  |
External

Since: Oct 14, 2005 Posts: 201
|
(Msg. 2) Posted: Mon Nov 28, 2005 12:55 pm
Post subject: Re: Static File Caching at Server Side [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Jerad Rose" <no.RemoveThis@spam.com> wrote in message
news:%23EaurJY8FHA.1028@TK2MSFTNGP11.phx.gbl...
> Thanks for your response, Egbert.
>
> I did mention both the ObjectCacheTTL and
> DisableMemoryCache/DisableStaticFileCache parameters in my post (not by
> name, but in concept). I understand the implications both of these would
> have, and are therefore not options for me (for the reasons you state --
> too much HD activity). Regarding the DoDirMonitoringForUnc parameter,
> this seems to be an IIS 6.0 only option, so this wouldn't work for me (it
> also seems to relate to UNC references, which are not applicable in my
> case). If I'm wrong on this though, let me know.
>
> I definitely understand the reasons behind static file caching, and why
> this shouldn't be disabled. I also understand (now) why the OS cannot
> continually monitor files for changes, and should only be happening every
> so often (30 seconds by default).
>
> But what I don't understand, is why there isn't a file-level setting to
> tell IIS *not* to cache an individual static file in memory -- similar to
> how there are file-level content expiration and content header settings to
> tell IIS not to allow client-side caching. In my case, it would be ideal
> to allow IIS to cache all static files, but have it make an exception for
> this one CSS file (while I'm debugging it) to prevent IIS from storing it
> in memory cache at all.
>
> Maybe what I'm asking is not a very common need. But I know I've run into
> this particular problem w/ CSS files *several* times over the years -- and
> I'm not a creative designer, rather a systems designer/developer.
I get the idea you figure, but programmers, often take the other approach,
make some static files (.css for instance) dynamic for a specific virtual
dir, by mapping it to the aspx ISAPI engine. The aspx file, should become
dynamic now. It reads from a database or some XML file or it even 'copies' a
CSS file from harddisk.
of course, understand me well, you would make the .css extension executable!
Got the idea?
> Thanks again, and if you have any additional feedback regarding what I've
> said, it would be appreciated. >> Stay informed about: Static File Caching at Server Side |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|