I am using the WebBrowser
control to post some data to a web server. I did notice that this doesn't work all the time if the query is the same and I guess this is due to some caching configuration.
E.g. I did try to post with an extra parameter who's value is the current timestamp but that's not the solutions I want.
I also tried new WebBrowser().Navigate("url here")
. This works all the time, but I would like to reuse objects.
The Refresh()
method did seem to m开发者_Python百科ake it work some times, but I could not figure out its exact behavior.
So how could I make the webBrowser.Navigate("url here")
always hit the server without tricks ? Or what to use instead ?
I may suggest to add fake parameter to your target url, for example add "&request10022" It will not take data from cache.
Beside @TheNIK suggestion, as WebBrowser
uses Internet explorer engine, so disabling IE cache also works as described here
精彩评论