This documentation is archived and is not being maintained.

HttpCachePolicy.SetAllowResponseInBrowserHistory Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

When set to true, the response is available in the client browser History cache regardless of the HttpCacheability setting made on the server.

[Visual Basic]
Public Sub SetAllowResponseInBrowserHistory( _
   ByVal allow As Boolean _
public void SetAllowResponseInBrowserHistory(
 bool allow
public: void SetAllowResponseInBrowserHistory(
 bool allow
public function SetAllowResponseInBrowserHistory(
   allow : Boolean


true to direct the client browser to store responses in the History folder, otherwise false. The default is false.


When HttpCacheability is set to NoCache or ServerAndNoCache the Expires HTTP header is by default set to -1, this tells the client not to cache responses in the History folder, so that when you use the back/forward buttons the client requests a new version of the response each time. You can override this behavior by setting the SetAllowInBrowserHistory method to true.

If HttpCacheability is set to values other than NoCache or ServerAndNoCache the value of SetAllowInBrowserHistory is ignored.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpCachePolicy Class | HttpCachePolicy Members | System.Web Namespace