HtmlHistory HtmlHistory HtmlHistory HtmlHistory Class


Manages the list of documents and Web sites the user has visited within the current session.

public ref class HtmlHistory sealed : IDisposable
public sealed class HtmlHistory : IDisposable
type HtmlHistory = class
    interface IDisposable
Public NotInheritable Class HtmlHistory
Implements IDisposable


The managed HTML Document Object Model (DOM) keeps track of the sites that a user has visited within a given session. A session is defined as the length of time from when an application hosting the managed HTML DOM starts until the application closes.

When you use the Url property or Navigate method of the WebBrowser control to navigate to a new Web page, Internet Explorer may either retrieve the latest version of that page from the server or display the version that is currently in the Internet Explorer cache. By contrast, when you use HtmlHistory to navigate forward and backward in this stack, Internet Explorer will display the pages from the local computer's cache of downloaded Web content, unless the server indicates that the document's content should expire immediately. For more information on the history list and caching in Internet Explorer, see article 234067 How To Prevent Caching in Internet Explorer in the Microsoft Support website.

The principal method of HtmlHistory is Go, which navigates either to the specified position in the navigation stack or to a new Uniform Resource Locator (URL). The Forward and Back methods navigate down and up the navigation stack, respectively, by the required number of entries.


DomHistory DomHistory DomHistory DomHistory

Gets the unmanaged interface wrapped by this class.

Length Length Length Length

Gets the size of the history stack.


Back(Int32) Back(Int32) Back(Int32) Back(Int32)

Navigates backward in the navigation stack by the specified number of entries.

Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the HtmlHistory.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Forward(Int32) Forward(Int32) Forward(Int32) Forward(Int32)

Navigates forward in the navigation stack by the specified number of entries.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
Go(Int32) Go(Int32) Go(Int32) Go(Int32)

Navigates to the specified relative position in the browser's history.

Go(String) Go(String) Go(String) Go(String)

Navigates to the specified Uniform Resource Locator (URL).

Go(Uri) Go(Uri) Go(Uri) Go(Uri)

Navigates to the specified Uniform Resource Locator (URL).

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to