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
继承
HtmlHistoryHtmlHistoryHtmlHistoryHtmlHistory
实现

注解

托管 HTML 文档对象模型 (DOM) 将跟踪用户在给定会话中访问的站点。The managed HTML Document Object Model (DOM) keeps track of the sites that a user has visited within a given session. 会话定义为从承载托管 HTML DOM 的应用程序开始到应用程序关闭时的时间长度。A session is defined as the length of time from when an application hosting the managed HTML DOM starts until the application closes.

使用Url WebBrowser控件的属性或Navigate方法导航到新网页时, Internet Explorer 可能会从服务器中检索该页面的最新版本, 或者显示当前在Internet Explorer 缓存。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. 相反, 当你使用HtmlHistory在此堆栈中向前和向后导航时, Internet Explorer 将显示下载的 Web 内容的本地计算机缓存中的页面, 除非服务器指明文档的内容应过期刚刚.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. 有关 Internet Explorer 中的历史记录列表和缓存的详细信息, 请参阅文章234067 如何在 Internet explorer 中阻止缓存Microsoft 支持部门网站。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.

的主体方法HtmlHistoryGo, 它导航到导航堆栈中的指定位置或导航到新的统一资源定位器 (URL)。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). ForwardBack方法分别向下和向下导航导航堆栈, 并按所需的项数。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()

释放由 HtmlHistory 使用的所有资源。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()

获取当前实例的 TypeGets 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)

定位到指定的统一资源定位器 (URL)。Navigates to the specified Uniform Resource Locator (URL).

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

定位到指定的统一资源定位器 (URL)。Navigates to the specified Uniform Resource Locator (URL).

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

创建当前 Object 的浅表副本。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)

适用于