How to disable caching in the .NET WebBrowser Control?

后端 未结 8 1739
我寻月下人不归
我寻月下人不归 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:30

    You could try adding a random number or guid in the url as a parameter. Such as:

    var url = "http://google.com";
    webBrowser.Navigate(url + "?refreshToken=" + Guid.NewGuid().ToString());
    

    It's not elegant, but it works. Hope it helps.

提交回复
热议问题