473,808 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Static File Caching at Server Side

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. If I need to try another
group, let me know. The reason I posted to this one, is because the most
helpful thread I've seen on this subject was in this group:

http://groups.google.com/group/micro...59555c655d1d44

Thanks in advance for any light you can shed on this mystery.

Jerad
Nov 23 '05 #1
1 1799
I have moved this topic to this newsgroup: microsoft.publi c.inetserver.ii s

Please make any responses you may have there.

Thanks.
Jerad

"Jerad Rose" <no@spam.com> wrote in message
news:Oe******** ******@TK2MSFTN GP09.phx.gbl...
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. If I need to try another
group, let me know. The reason I posted to this one, is because the most
helpful thread I've seen on this subject was in this group:

http://groups.google.com/group/micro...59555c655d1d44

Thanks in advance for any light you can shed on this mystery.

Jerad

Nov 24 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1606
by: moko | last post by:
I want to know whether 'dataset caching' is at the client end , or the server ? Similarly is an aspx page caching at the server or client ? Are there any 'gotchas' with caching ?
13
5687
by: Rohit | last post by:
I need to turn off caching in my ASP.NET page. I have set the following code in Page Load event: Response.Cache.SetCacheability(HttpCacheability.NoCache) Still, sometimes the page is retreived from cache. Are there any other options I need to set? TIA Rohit
0
1355
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated), after some investgation i found out that most of it being consumed by filesystem caching... thanks to Liam and Phil Sherman for their valuable suggestions. Is it safe to turn off filesystem caching on every tablespaceon the server?? or can we...
5
7860
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated), after some investgation i found out that most of it being consumed by filesystem caching... thanks to Liam and Phil Sherman for their valuable suggestions. Is it safe to turn off filesystem caching on every tablespaceon the server(i.e. DIO) ??...
3
1346
by: urs.eichmann | last post by:
Hello, several parts of the pages of my ASP.NET 2.0 site are mainly static, such as a treeview with all the product categories, a menu bar, the company header and so on. But they also have a dynamic part, such as a product list. If I look at the rendered HTML, the static parts are roughly 60%-70% of the whole HTML sent to the client. Especially the treeview will quickly sum up to 30K of nested TABLE, TR, TD tags and javascript. Since...
3
4018
by: wardemon | last post by:
Hi All, I have a aspx page named: ImageProcess.aspx that creates a thumbnail version of an image by passing the ImagePath, width, and height. The ImagePath is taken from a table from a database, while width and height is user specific - meaning user can change this on demand. My question is, although this rendering images on the fly is cool, I would like to implement some sort of mechanism/logic that it wont keep rendering the thumbnail...
17
2746
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script src="/shared/scripts/common.js?revision=1.6" type="text/javascript">. I am trying to see if there is any big deal to this or a best practice that is starting to creep up in the JavaScript community. If this is used only as a way to distinguish what...
14
1564
by: Gilles Ganault | last post by:
Hi One of the ways to raise performance for PHP apps is to separate static contents from dynamic contents, so that the former can be compiled once into cache. Can someone give me a simple example of how this kind of thing is done when making calls to MySQL? Thank you.
8
3923
by: Matthew Wells | last post by:
Hello, I'm working on an ASP.net 2.0 web project using VS 2005. I'm on my laptop running IIS on WinXP SP2 with all the latest updates. The Default web site is set to run on .net 2.0 My project uses a master page. I have two separate issues that I think are related. First, I can't figure out why changes to my CSS don't load when I start the project. The css is in the master page. The CSS loads, but only the last
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10631
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.