How to disable caching in the .NET WebBrowser Control?

后端 未结 8 1740
我寻月下人不归
我寻月下人不归 2021-01-04 20:01

I have been googling for hours and trying to figure this out, and I just can\'t. I have 1 webbrowser control on a form, webbrowser1.

Once I load a page, say google.

相关标签:
8条回答
  • 2021-01-04 20:38

    You could try to call webbrowser1.Refresh(WebBrowserRefreshOption.Completely). It should refresh the page and show the latest version, something like ctrl+F5 in IE. See here and here more info.

    0 讨论(0)
  • 2021-01-04 20:39

    You can't disable it. You can either refresh the page, clear the cache before each request, or use something other than the web browser control. If you want to clear the cache before each request, there is a LOT of bad information online. I would recommend you to my answer here: https://stackoverflow.com/a/22074463/1607218. Beware, the code posted in the other answers on that page is NOT reliable, and is massively buggy, but hopefully my answer will lead you in the right direction : )

    0 讨论(0)
提交回复
热议问题