Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Disable image caching?

Reply
Thread Tools

Disable image caching?

 
 
Noozer
Guest
Posts: n/a
 
      06-02-2005
I load a webpage on my client PC, change an image file on the server, and
reload the webpage on the client. I still see the orignal image.

Currently I have the following at the top of my page source:
<%
response.ContentType = "image/jpeg"
Response.CacheControl = "no-cache, must-revalidate"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Response.AddHeader "Last-Modified", date
%>

IIS is set to expire content immediately.

What do I need to do to ensure that the images are fresh from the server
every time? (...and I did search Google and no solutions I could find made
any difference.)

Thx!


 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      06-02-2005
Noozer wrote:

> Currently I have the following at the top of my page source:
> <%
> response.ContentType = "image/jpeg"
> Response.CacheControl = "no-cache, must-revalidate"
> Response.AddHeader "Pragma", "no-cache"
> Response.Expires = -1
> Response.AddHeader "Last-Modified", date
> %>


At the top of the *page* or the top of the *image*. You need to send these
headers with the *image*. (Alternatively, just change the image file name
every time you update it.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
 
Noozer
Guest
Posts: n/a
 
      06-05-2005

"Toby Inkster" <(E-Mail Removed)> wrote in message
news(E-Mail Removed) .uk...
> Noozer wrote:
>
> > Currently I have the following at the top of my page source:
> > <%
> > response.ContentType = "image/jpeg"
> > Response.CacheControl = "no-cache, must-revalidate"
> > Response.AddHeader "Pragma", "no-cache"
> > Response.Expires = -1
> > Response.AddHeader "Last-Modified", date
> > %>

>
> At the top of the *page* or the top of the *image*. You need to send these
> headers with the *image*. (Alternatively, just change the image file name
> every time you update it.)


Doh!

Thanks... Moving it to the image seems to have it working as needed. I
assumed that at the top of the page I was telling it not to cache any
images.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
ASP.NET Image Caching Problem (How to Disable it?) Mike Sobeiski ASP .Net 2 08-07-2004 05:28 PM
How to disable browser caching for an image? Dominic HTML 3 06-30-2004 10:31 AM
Disable Image Caching Kamyar Souri ASP .Net 1 05-13-2004 09:49 AM
Disable xp image Paul Croft Computer Support 1 01-25-2004 01:29 PM



Advertisments