Caching problems when viewing list of uploaded images

Last post 04-29-2004, 6:59 AM by arjenkorevaar. 2 replies.
Sort Posts: Previous Next
  •  04-26-2004, 4:48 AM 722

    Caching problems when viewing list of uploaded images

    When I use the Insert Image dialog, the list of images is nog correct. When I delete a file for instance, it is deleted from disk. When I re-open the dialog however, the image is back in the list. After I insert it, the image shows up in CuteEditor, but fails when loading the actual page.

     

    Seems to me the image, and also the list of images, get cached within the dialogs.

     

    I've tried to add meta tags to the aspx files (expires = -1 and pragma = no-cache) but that didn't have effect.

     

    So, is there some code in the codebehind that prevents the browser from caching the files ? I know there is this

    Response.Cache.SetCacheability(HttpCacheability.NoCache); method that disables caching, but it should be inserted in the codebehind files.

     

    Grtz

  •  04-28-2004, 11:44 AM 733 in reply to 722

    Re: Caching problems when viewing list of uploaded images

    Grtz,

     

    You can disable output caching for the page entirely by setting the Location attribute to None. This is the equivalent of using the HttpCacheability.NoCache field.

     

    For example, including <%@ OutputCache Duration=0 Location="None" %> at the top of Insert Image dialog page will diable output caching. 

     

  •  04-29-2004, 6:59 AM 735 in reply to 733

    Re: Caching problems when viewing list of uploaded images

    Duration=0 raises an error about the Duration must be a positive integer value.

     

    I therefor changed the Duration to 1 which seems to solve the caching problem.

     

    ThanX !

View as RSS news feed in XML