This is a migrated thread and some comments may be shown as answers.

Expire Previous Web Page

1 Answer 44 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
VeriFone
Top achievements
Rank 1
VeriFone asked on 06 May 2010, 12:54 PM
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

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 11 May 2010, 09:17 AM
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.
Tags
Ajax
Asked by
VeriFone
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or