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. Advertisements

  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. Advertisements

  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. Advertisements

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. Dorte
    Replies:
    0
    Views:
    367
    Dorte
    Feb 16, 2004
  2. =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=

    Does the ASP.Net Panel client side onLoad work?

    =?Utf-8?B?Qi4gQ2hlcm5pY2s=?=, Feb 19, 2006, in forum: ASP .Net
    Replies:
    17
    Views:
    13,727
    Chris R. Timmons
    Feb 21, 2006
  3. Dominic
    Replies:
    3
    Views:
    17,413
    Whitecrest
    Jun 30, 2004
  4. David C
    Replies:
    0
    Views:
    700
    David C
    Oct 27, 2007
  5. Joe

    Gridview update does not work

    Joe, Nov 3, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    808
  6. Gridview update does not work

    , Nov 3, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    223
  7. Phi!
    Replies:
    1
    Views:
    357
  8. Sven Fischer
    Replies:
    0
    Views:
    705
    Sven Fischer
    Oct 22, 2012
Loading...