Refresh Method (WebBrowserRefreshOption)
Collapse the table of content
Expand the table of content

WebBrowser.Refresh Method (WebBrowserRefreshOption)

 

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

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

public void Refresh(
	WebBrowserRefreshOption opt
)

The 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 Refresh method forces the WebBrowser control to reload the current page. The type of reload depends on the WebBrowserRefreshOption value specified. If you call the 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.

System_CAPS_noteNote

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

SecurityPermission

for immediate callers to use this control. Demand value: LinkDemand; NIB: Named Permission Sets: FullTrust.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft