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 _
)
[C#]
public void SetAllowResponseInBrowserHistory(
 bool allow
);
[C++]
public: void SetAllowResponseInBrowserHistory(
 bool allow
);
[JScript]
public function SetAllowResponseInBrowserHistory(
   allow : Boolean
);

Parameters

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

Remarks

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.

Requirements

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

See Also

HttpCachePolicy Class | HttpCachePolicy Members | System.Web Namespace

Show: