EO WebBrowser 页面缓存问题
EO WebBrowser Page cache issue
我在 windows 中使用 EO webView 来加载 HTML 页面。即使我在页面中使用以下内容,页面似乎也会缓存。如何确保每次加载页面时都进行硬刷新?
我在 windows 表单中为 "PageRefresh" 添加了一个上下文菜单项,因此它会在选择菜单项时运行 CommandIds.ReloadNoCache
。我该怎么做才能在页面加载时发生。
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
我有以下代码来添加一个菜单项来执行页面刷新,它工作正常,但我希望它在用户触发菜单项时发生。
private void WebView_BeforeContextMenu(object sender, BeforeContextMenuEventArgs e)
{
e.Menu.Items.Clear();
e.Menu.Items.Add(new EO.WebBrowser.MenuItem("ViewSource", CommandIds.ViewSource));
e.Menu.Items.Add(new EO.WebBrowser.MenuItem("PageRefresh", CommandIds.ReloadNoCache));
}
In the current version the only way to clear cache is seems to delete
the EO.WebBrowser.Runtime.CachePath directory. You will need to close
all WebView instances in order to do so. In the future we will add
some interface for you to clear cache programmatically without having
to shutdown all WebViews.
我在 windows 中使用 EO webView 来加载 HTML 页面。即使我在页面中使用以下内容,页面似乎也会缓存。如何确保每次加载页面时都进行硬刷新?
我在 windows 表单中为 "PageRefresh" 添加了一个上下文菜单项,因此它会在选择菜单项时运行 CommandIds.ReloadNoCache
。我该怎么做才能在页面加载时发生。
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
我有以下代码来添加一个菜单项来执行页面刷新,它工作正常,但我希望它在用户触发菜单项时发生。
private void WebView_BeforeContextMenu(object sender, BeforeContextMenuEventArgs e)
{
e.Menu.Items.Clear();
e.Menu.Items.Add(new EO.WebBrowser.MenuItem("ViewSource", CommandIds.ViewSource));
e.Menu.Items.Add(new EO.WebBrowser.MenuItem("PageRefresh", CommandIds.ReloadNoCache));
}
In the current version the only way to clear cache is seems to delete the EO.WebBrowser.Runtime.CachePath directory. You will need to close all WebView instances in order to do so. In the future we will add some interface for you to clear cache programmatically without having to shutdown all WebViews.