Need Help stopping pages/images from being cached

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    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.Expi res = -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


  • Alan Howard

    #2
    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.AddHea der "expires", "0"
    Response.AddHea der "pragma", "no-cache"
    Response.AddHea der "cache-control", "no-cache"

    Seems to work.

    Alan

    "Dan" <someone@somewh ere.com> wrote in message
    news:uP5BBIiMEH A.1484@tk2msftn gp13.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.Expi res = -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]


    Comment

    Working...