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

R

Ron Lessnick

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
 
M

[MSFT]

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
 
R

Ron Lessnick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top