问题
Yesterday I came across one of the sites that uses to display the "Views"(i.e.the no of persons visited the page).When I clicked the refresh button the count started increasing.
Then I wrote this small application to increase the view count.
browser = new WebBrowser();
for (int index = 0; index < 250000; index++)
{
{
browser.Navigate("url");
System.Threading.Thread.Sleep(100);
}
}
I reported the bug and they have rectified it.Now even if I press the F5 button the view count won't increase.But when I run the above program the count starts increasing..
Can somebody explain me the difference between Navigate function and Refresh(F5)?
回答1:
Navigate
Loads the document at the specified Uniform Resource Locator (URL) into the WebBrowser control, replacing the previous document.
Refresh
Reloads the document currently displayed in the WebBrowser control.
A document refresh simply reloads the current page, so the Navigating, Navigated, and DocumentCompleted events do not occur when you call the Refresh method.
Note: Links are for webbrowser control but I presume their information is valid
来源:https://stackoverflow.com/questions/17963824/difference-between-refresh-and-navigate-function-in-browser-control