Expire Previous Web Page

2 posts, 0 answers
  1. VeriFone
    VeriFone avatar
    12 posts
    Member since:
    Sep 2007

    Posted 06 May 2010 Link to this post

    Hi All,

    I'm trying to expire the previous web page. Now I can achieve this by

    Response.AddHeader(

    "Pragma", "no-cache")

     

    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    Response.Cache.SetExpires(DateTime.Now.AddHours(-1))



    in the page.load event for pages that do not have AJAX enabled. But for a few of my projects pages i've a

    RadAjaxManager

     

    which somehow interfers with the above code. I'm certain its to do with the AJAX callback as when I set

     

    EnableAJAX

     

    ="false" all works as before.

    Does anyone no how to expire the page when AJAX is enabled or have any suggestions????


    Thanks

    Mark

  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 11 May 2010 Link to this post

    Hi Mark,

    On AJAX request, the response headers are ignored. This means that, as there is no full page refresh, you get the headers from the first page load effective. AJAX callbacks cannot change the page caching conditions. You need to disable the cache the first time the page is loaded.

    Regards,
    Veli
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top