How to do a CEF window refresh?

14,486

Solution 1

In C# you can use this method:

chromeBrowser.Reload(true);

Test on VS 2015

Read more in document: WebBrowserExtensions.Reload Method

Solution 2

Not sure what platform/language you are using. The following C++ code will reload the web page.

CefRefPtr<ClientHandler> g_handler;
g_handler->GetBrowser()->Reload();

You could find cefclient project from the official package, It demonstrates various CEF API usage.

Solution 3

In VB.NET I use the following code:

Call webBrowser.GetBrowser.Reload()

Share:
14,486

Related videos on Youtube

Abhimanyu Vohra
Author by

Abhimanyu Vohra

Updated on June 04, 2022

Comments

  • Abhimanyu Vohra
    Abhimanyu Vohra almost 2 years

    I have an app with 2 tabs. The container of app is developed in Native code and CEF has been used to open html pages in one of the tabs. When I switch from Tab 1 (Native) to Tab 2(CEF) contents of Tab 1 are visible on Tab 2, though Tab 2 has html page loaded. As I hover mouse over Tab 2 in this situation or do any activity on Tab 2(which has presently content of Tab 1 visible), html content becomes visible. I have checked that I hide/show calls are properly being sent.

    As I am not able to find any solution I would like to know if there is some way to refresh the CEF page. I think if I am able to refresh Tab 2 at every switch to Tab 2 it should work fine. Thanks