473,411 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

IIS Caching of .NET components

Our ASP.NET application, using the .NET 1.0 framework servers up .aspx
pages to the browser. Each GET and POST request should never be
cached - and never is.

However there is a number of javascript, cascading styles sheet and
image files that are being sent to the browser with every page request
(if I examine the HTTP flow).

How can I prevent these files from being sent each time if they are
not modified - is this a .NET Framework issue or an IIS issue?
Nov 18 '05 #1
1 1009
If the files are being served by IIS (and they would be, by default) it's an
IIS configuration issue. Use the IIS Manager to set HTTP Expiration times
for the directories containing static content files. (Right click my
computer. Choose manage. Choose services | IIS. Expand the folder tree.
Right-click the folder, choose properties. Click the HTTP Headers tab.
Place a checkmark in the "Enable Content Expiration" box. Expire content a
set interval of time later".

Please note that due to the way HTTP works, the client won't even request a
cached file-- so either keep a reasonably short expiration time (Office
Online uses 1 day) or change the filenames every time you make a change.
See the book "HTTP: The Definitive Reference" for more details.

(See http://www.fiddlertool.com for a free tool which can help analyze
problems like this. In the "Expires" column, you'll see responses which
contain no CACHE-CONTROL: max-age or EXPIRES: headers. These responses will
not be cached by the browser.)

Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Tim Smith" <ti*******@hotmail.com> wrote in message
news:a7************************@posting.google.com ...
Our ASP.NET application, using the .NET 1.0 framework servers up .aspx
pages to the browser. Each GET and POST request should never be
cached - and never is.

However there is a number of javascript, cascading styles sheet and
image files that are being sent to the browser with every page request
(if I examine the HTTP flow).

How can I prevent these files from being sent each time if they are
not modified - is this a .NET Framework issue or an IIS issue?

Nov 18 '05 #2

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

Similar topics

2
by: Shabam | last post by:
I need to implement a caching mechanism for my script URLs. Instead of www.domain.com/script.cgi?id=1234 , which the browser will obviously not cache, I want the URL to be something like...
1
by: CJM | last post by:
I'm working on an ASP application on my XP m/c. I've uploaded a copy of the ASP code and accompanying DB onto another server that is running both IIS5 & SQL Server. This is so that the...
0
by: CJM | last post by:
I'm working on an ASP application on my XP m/c. I've uploaded a copy of the ASP code and accompanying DB onto another server that is running both IIS5 & SQL Server. This is so that the...
2
by: Steve W | last post by:
I have an ASP.NET app that calls into some VB.NET components. It passes in the current application's cache (HttpContext.Current.Cache). These VB.NET components also get called by a non-ASP.NET...
13
by: tshad | last post by:
How do we handle Caching in IE? It seems that my system works fine in Mozilla and Netscape when I make changes. But in IE the changes are not brought across when someone has been to the site...
2
by: Oberon | last post by:
Why does this not work as it should? I expect index.aspx to show:. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\ChatSimple\db\chatusers.mdb Instead, I get: ...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
5
by: DC Gringo | last post by:
I am having a problem reading a simple update to the database. Basically I'm testing a small change to the pubs database -- changing the price of the Busy Executive's Database Guide from 19.99 to...
1
by: Andrew Clancy | last post by:
Okay my question last night wasnt answered - here's a simpler one: I have a form user control, I want to cache the first page (with clientside validation) but turn caching off whenever anyone...
4
by: Henrik Dahl | last post by:
Hello! In my application I have a need for using a regular expression now and then. Often the same regular expression must be used multiple times. For performance reasons I use the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.