T
Tom.PesterDELETETHISSS
Hi,
I think this question requires an in depth understanding of how a browser
cache works. I hope I can reach an expert here.
I may have found a quirk in the asp.net documentation or I don't understand
what the SetAllowResponseInBrowserHistory does.
While researching caching I tried the code sample at the following page :
http://msdn2.microsoft.com/library/97wcd0a4(en-us,vs.80).aspx
I find this code absurd since it tries to show that you can view a page that
has been _posted_ with the history feature of the browser.
Can you try this code and report your findings please? I tried it on a clean
VM install and on my dev pc: the browser says "page expired".
The docs say you would see the old page in the browser.
I did some tests and this is what the following code does with the response
headers :
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetAllowResponseInBrowserHistory(False) ' False
is the default
'Cache-Control: no-cache
'Expires: -1
'Pragma: no - Cache
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetAllowResponseInBrowserHistory(True)
'Cache-Control: no-cache
'Pragma: no - Cache
The docs are right about the Expires header. When SetAllowResponseInBrowserHistory
= True the Expires header disappears.
Does anybody have a clue why SetAllowResponseInBrowserHistory was called
into existence and where it might be useful?
Thanks,
Tom Pester
I think this question requires an in depth understanding of how a browser
cache works. I hope I can reach an expert here.
I may have found a quirk in the asp.net documentation or I don't understand
what the SetAllowResponseInBrowserHistory does.
While researching caching I tried the code sample at the following page :
http://msdn2.microsoft.com/library/97wcd0a4(en-us,vs.80).aspx
I find this code absurd since it tries to show that you can view a page that
has been _posted_ with the history feature of the browser.
Can you try this code and report your findings please? I tried it on a clean
VM install and on my dev pc: the browser says "page expired".
The docs say you would see the old page in the browser.
I did some tests and this is what the following code does with the response
headers :
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetAllowResponseInBrowserHistory(False) ' False
is the default
'Cache-Control: no-cache
'Expires: -1
'Pragma: no - Cache
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetAllowResponseInBrowserHistory(True)
'Cache-Control: no-cache
'Pragma: no - Cache
The docs are right about the Expires header. When SetAllowResponseInBrowserHistory
= True the Expires header disappears.
Does anybody have a clue why SetAllowResponseInBrowserHistory was called
into existence and where it might be useful?
Thanks,
Tom Pester