如何在.NET WebBrowser控件禁用缓存? [英] How to disable caching in the .NET WebBrowser Control?

查看:161
本文介绍了如何在.NET WebBrowser控件禁用缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在谷歌上搜索了几个小时,试图弄清楚这一点,我只是不能。
我有一个形式,webbrowser1 1 WebBrowser控件。

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.

在我打开一个页面,说google.com,如果我用 webbrowser1.refresh() WebBrowser1.Navigate时(google.com ),它没有重新加载页面,它有它高速缓存,所以它只是重新加载缓存。这是非常明显的特别是在像论坛或Craigslist的页面。

Once I load a page, say google.com, if I use webbrowser1.refresh() or webbrowser1.navigate("google.com"), it's not reloading the page, it has it cached so it's just reloading the cache. This is terribly apparent especially on pages like forums or craigslist.

我需要清除每次刷新(不理想)或禁用缓存之间的高速缓存都在一起,任何想法?我发现的唯一的东西是过时的(VB6或更低)。

I need to clear the cache between each refresh (not ideal) or disable caching all together, any ideas? The only things I've found are outdated (vb6 or lower).

推荐答案

您可以尝试调用 webbrowser1.Refresh(WebBrowserRefreshOption.Completely)。它应该刷新页面,显示最新的版本,像CTRL + F5在IE中。请参见这里和的此处更多信息。

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.

这篇关于如何在.NET WebBrowser控件禁用缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆