Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EO WebBrowser Page cache issue

I am using a EO webView inside a windows from to load an HTML page. The page seems to cache even though I am using the following in the page. How can I make sure the page loads with a hard refresh each time?

I have added a context menu item in the windows form for "PageRefresh", so it runs CommandIds.ReloadNoCache on selecting the menu item. How do I make is to happen on Page Load.

    <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" />

I have the following code to add a menu item to do the PageRefresh, which works fine, but I want it to happen with user triggering the menu item.

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));

}
like image 340
django Avatar asked Sep 26 '22 11:09

django


1 Answers

Quoting from EO admin response

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.

like image 93
Anil Avatar answered Sep 28 '22 06:09

Anil