System.Windows.Forms.WebBrowser.Refresh Method

Reloads the document currently displayed in the System.Windows.Forms.WebBrowser control using the specified refresh options.

Syntax

public void Refresh (WebBrowserRefreshOption opt)

Parameters

opt
One of the System.Windows.Forms.WebBrowserRefreshOption values.

Remarks

The System.Windows.Forms.WebBrowser control stores recently visited Web pages in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. The WebBrowser.Refresh method forces the System.Windows.Forms.WebBrowser control to reload the current page. The type of reload depends on the System.Windows.Forms.WebBrowserRefreshOption value specified. If you call the WebBrowser.Refresh method with the WebBrowserRefreshOption.Completely value, the latest version of the document is downloaded. If you use the WebBrowserRefreshOption.IfExpired value, the latest version is downloaded only if the current document has expired. If you use the WebBrowserRefreshOption.Normal value, the server sends a copy of the document stored in its own cache.

Note:

A document refresh simply reloads the current page, so the WebBrowser.Navigating, WebBrowser.Navigated, and WebBrowser.DocumentCompleted events do not occur when you call the WebBrowser.Refresh method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0