473,396 Members | 2,020 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,396 software developers and data experts.

How to not cache all elements of a web page download?

I have to continuously download the same web page on our IIS server. It is
important to always download a fresh page from the server including not only
the .asp page itself but all the .gif and .jpg files associated with that
page. We need to measure statistical info on how long it takes to download.
If the page is stored in the client machines internet cache that would be a
problem.
Now I know how to add the following to the main .asp page to insure a fresh
copy is always downloaded of this page itself.
<% Response.Expires = -2000 %>

When I look at the client machines cache folder it does show that the main
..asp page has expired an hour ago. However
all the .gifs and .jpgs , etc downloaded with the main .aps page show the
value Expire: None which I conclude means that these pieces are not
redownload each time we get the main .asp page.

Up till now we have been using a perl script to try and erase the cache
before each download . This works sometimes but not all the time.

Is there any way to force the .gifs, .jpgs etc. to have to download fresh
each time just like I was able to get the main .asp page to redownload with
<% Response.Expires = -2000 %>

TIA
Ron


Jul 22 '05 #1
3 2254
cheat....
Just add a random string/character to the end of the URL link... that makes
the browser always think its a new page.
It's a bit of a kludge but it works

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Ron Lessnick" <le******@lucent.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I have to continuously download the same web page on our IIS server. It is
important to always download a fresh page from the server including not
only
the .asp page itself but all the .gif and .jpg files associated with that
page. We need to measure statistical info on how long it takes to
download.
If the page is stored in the client machines internet cache that would be
a
problem.
Now I know how to add the following to the main .asp page to insure a
fresh
copy is always downloaded of this page itself.
<% Response.Expires = -2000 %>

When I look at the client machines cache folder it does show that the main
.asp page has expired an hour ago. However
all the .gifs and .jpgs , etc downloaded with the main .aps page show the
value Expire: None which I conclude means that these pieces are not
redownload each time we get the main .asp page.

Up till now we have been using a perl script to try and erase the cache
before each download . This works sometimes but not all the time.

Is there any way to force the .gifs, .jpgs etc. to have to download fresh
each time just like I was able to get the main .asp page to redownload
with
<% Response.Expires = -2000 %>

TIA
Ron

Jul 22 '05 #2
If your images on the ASP page need updated everytime, you may not use a
static url link to a image. Instead, you may use a link to a ASP page which
read image file on server side and write binary data to Response. This can
force it refresh everytime.

Luke

Jul 22 '05 #3
Thanks for the replies.

I used Curt's Method and it works fine.

i.e.; <IMG height=110
src="CNET_com_files/2ghz.gif?<%=someRandomNumberVarible%>" width=85

"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:DX**************@cpmsftngxa10.phx.gbl...
If your images on the ASP page need updated everytime, you may not use a
static url link to a image. Instead, you may use a link to a ASP page which read image file on server side and write binary data to Response. This can
force it refresh everytime.

Luke

Jul 22 '05 #4

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

Similar topics

5
by: Jeff B. | last post by:
Hello, Can anyone tell me how long an assembly downloaded via a no-touch application will remain in the assembly download cache? I realize I can manually remove them via the "gacutil.exe /cdl"...
0
by: Bryan McArdle | last post by:
How is the .NET Download Assembly Cache related to IE's Temporary Internet Files cache? We have a large app that we are deploying using .NET's No-Touch-Deployment capability to launch the app...
5
by: Tim_Mac | last post by:
hi, i read that by adding the following code to by aspx pages, it would not store temporary internet files: Response.Cache.SetCacheability(HttpCacheability.NoCache); it didn't actually work...
1
by: merrittr | last post by:
This might not be the forum for this but oh well... I have a web app that writes fields into a PDF document, it then displays a link to this document via an anchor tag. Here is where I get...
1
by: Fred Nelson | last post by:
I have a question regarding page caching in a C# Web App that I'm developing. I have used page caching successfully in VS2003 at the page level - and it also works the same in VS2005. I have...
2
by: Just D. | last post by:
All, Can we enable/disable the cache for each control separately or it's a global feature for the whole page? I'm aware of many settings and some bugs regarding cache but I've never seen...
18
by: Mark | last post by:
Hello. I am looking for a way to download and cache a web page that the user has not yet requested, and write the web page to the browser cache without displaying it. My intention is to improve...
1
by: | last post by:
I've built an application that scrapes JPG images of webpages and PDF instances of those webpages automatically from an RSS feed. References to the scraped resources are persisted to our database....
1
by: WT | last post by:
Hello, I have a dictionary made with objects which contain a control element, the control element is added to a Page when I want to edit the dictionary content. I put this dictionary in cache...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.