clear cache for WebBrowser
Assume I have a WebBrowser control called webBrowser1, and I would like to use it to display an image, which changes from time to time. I thought that I could show the most up-to-date image by calling the following line:
webBrowser1.DocumentText = "<img src='foo' width='100%' height='100%'>";
But that didn't work, and looked like WebBrowser kept a cached image.
I tried Refresh() and Refresh(WebBrowserRefreshOption.Complete), and none of those worked either.
I can make it work by set url to foo and then call Refresh(). But that won't work for every situation, for example when I have multiple images on the page.
Last edited by PeterPeiGuo; March 2nd, 2010 at 01:44 PM.