Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:07 PM
Dan
Guest
 
Posts: n/a
Default Need Help stopping pages/images from being cached

Is there an effective way to stop pages from being cached?

I've created several websites that have dynamic content and images that are
managed by a client. The images are named according to the "id" generated
via an Identity column of their corresponding database record (ex:
1058.jpg). The problem occurs when the client tries to change the image.
The client gets understandly confused because the old image is still
displayed, due to the browser caching the image. How can I force the
browser to stop caching the page/image?

All of the ASP pages already have the following:

<%Response.Expires = -1%>
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">

Any ideas?

Thanks,
Dan


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004


  #2  
Old July 19th, 2005, 01:07 PM
Alan Howard
Guest
 
Posts: n/a
Default Re: Need Help stopping pages/images from being cached

I've always turned on Immediate Content Expiration (Web Site Properties ->
HTTP Headers) and used this in my ASPs:

Response.AddHeader "expires", "0"
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "no-cache"

Seems to work.

Alan

"Dan" <someone@somewhere.com> wrote in message
news:uP5BBIiMEHA.1484@tk2msftngp13.phx.gbl...[color=blue]
> Is there an effective way to stop pages from being cached?
>
> I've created several websites that have dynamic content and images that[/color]
are[color=blue]
> managed by a client. The images are named according to the "id" generated
> via an Identity column of their corresponding database record (ex:
> 1058.jpg). The problem occurs when the client tries to change the image.
> The client gets understandly confused because the old image is still
> displayed, due to the browser caching the image. How can I force the
> browser to stop caching the page/image?
>
> All of the ASP pages already have the following:
>
> <%Response.Expires = -1%>
> <meta http-equiv="expires" content="0">
> <meta http-equiv="pragma" content="no-cache">
>
> Any ideas?
>
> Thanks,
> Dan
>
>
> ---
>
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004
>
>[/color]


 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles