Browser Image Caching In IE Does Not Work In Update Panel

Discussion in 'ASP .Net' started by Rain, Aug 7, 2008.

  1. Rain

    Rain Guest

    When the content of the panel is refreshed. The image is reloaded event
    though the browser has it in its cache. Does anyone know how to prevent this
    happening ?

    <asp:updatepanel id="xxx" runat"=server" >
    <contenttemplate>

    <img src="myImage.gif" alt="" />


    </content ..........
    Rain, Aug 7, 2008
    #1
    1. Advertising

  2. Rain

    bruce barker Guest

    when the panel is updated, all the html inside the panel div is re-rendered.,
    so the browser re-fetches the image and displays it. use fiddler to check the
    cache headers to see why the cache is not used.

    -- bruce (sqlwork.com)


    "Rain" wrote:

    > When the content of the panel is refreshed. The image is reloaded event
    > though the browser has it in its cache. Does anyone know how to prevent this
    > happening ?
    >
    > <asp:updatepanel id="xxx" runat"=server" >
    > <contenttemplate>
    >
    > <img src="myImage.gif" alt="" />
    >
    >
    > </content ..........
    >
    >
    >
    bruce barker, Aug 7, 2008
    #2
    1. Advertising

  3. Rain

    Rain Guest

    Hi Bruce.

    Ive never heard of fiddler, I assume its a HTTP Sniffer for which I have
    IEWebDeveloper . I have discovered two things since I wrote this.

    1.) This is not a problem in IE7. only IE6

    2.) using the following code seems to create a cached version in the
    document. so that the only time the images are loaded is on the first GET.

    myImage = new Image();
    myImage.src = "imageURL";

    Now I still need to check this in IE6. But if you preload this in the
    window.load event, it never has to go back to the server in IE7. I think it
    still might be an issue in IE6 but Ill find out tomorrow, if so Ill have to
    find another strategy.


    Cheers for the help.



    "bruce barker" <> wrote in message
    news:...
    > when the panel is updated, all the html inside the panel div is
    > re-rendered.,
    > so the browser re-fetches the image and displays it. use fiddler to check
    > the
    > cache headers to see why the cache is not used.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Rain" wrote:
    >
    >> When the content of the panel is refreshed. The image is reloaded event
    >> though the browser has it in its cache. Does anyone know how to prevent
    >> this
    >> happening ?
    >>
    >> <asp:updatepanel id="xxx" runat"=server" >
    >> <contenttemplate>
    >>
    >> <img src="myImage.gif" alt="" />
    >>
    >>
    >> </content ..........
    >>
    >>
    >>
    Rain, Aug 7, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry
    Replies:
    3
    Views:
    529
    Harry Singh
    Nov 10, 2003
  2. HS1
    Replies:
    3
    Views:
    474
  3. HS1
    Replies:
    4
    Views:
    8,280
    Babu Kalakrishnan
    Dec 8, 2004
  4. Dominic
    Replies:
    3
    Views:
    16,588
    Whitecrest
    Jun 30, 2004
  5. Sven Fischer
    Replies:
    0
    Views:
    457
    Sven Fischer
    Oct 22, 2012
Loading...

Share This Page