HtmlHistory 類別

定義

管理使用者在目前工作階段內瀏覽過的文件和網站清單。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
繼承
HtmlHistory
實作

備註

Managed HTML 檔案物件模型 (DOM) 會追蹤使用者在給定會話內流覽過的網站。The managed HTML Document Object Model (DOM) keeps track of the sites that a user has visited within a given session. 會話會定義為裝載 MANAGED 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 中歷程記錄清單和快取的詳細資訊, 請參閱 Microsoft 支援服務網站中的文章234067 如何避免在 Internet explorer 中進行快取。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.

的主要方法HtmlHistory是, Go它會導覽至導覽堆疊中的指定位置, 或流覽至新的統一資源定位器 (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

取得此類別包裝的 Unmanaged 介面。Gets the unmanaged interface wrapped by this class.

Length

取得記錄堆疊的大小。Gets the size of the history stack.

方法

Back(Int32)

在巡覽堆疊中往後巡覽指定的項目數。Navigates backward in the navigation stack by the specified number of entries.

Dispose()

釋放 HtmlHistory 所使用的所有資源。Releases all resources used by the HtmlHistory.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Forward(Int32)

在巡覽堆疊中往前巡覽指定的項目數。Navigates forward in the navigation stack by the specified number of entries.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
Go(Int32)

巡覽至瀏覽器記錄中的指定相對位置。Navigates to the specified relative position in the browser's history.

Go(String)

巡覽至指定的統一資源定位器 (URL)。Navigates to the specified Uniform Resource Locator (URL).

Go(Uri)

巡覽至指定的統一資源定位器 (URL)。Navigates to the specified Uniform Resource Locator (URL).

MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於