Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Clear history on page load
Clear history on page load
Is it possible to clear the current browser history when loading a page? I see that it was implemented in CEF (https://bitbucket.org/chromiumembedded/ ... story/diff)
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Clear history on page load
Hi,
That's an old pull request that cannot be merged due to conflicts. The current API has no load_urlwith_params function in the frame as you can see here :
https://bitbucket.org/chromiumembedded/ ... ew-default
The issue that it's trying to fix is this :
https://bitbucket.org/chromiumembedded/ ... on-history
That issue is still open and it was marked has "has fix". Perhaps because at that time CefRenderProcessHandler::OnBeforeNavigation could be used to block history-related navigations.
https://magpcss.org/ceforum/viewtopic.p ... 810#p25197
https://magpcss.org/ceforum/viewtopic.p ... 310#p26207
However, CefRenderProcessHandler::OnBeforeNavigation was removed from the API a few months ago.
That's an old pull request that cannot be merged due to conflicts. The current API has no load_urlwith_params function in the frame as you can see here :
https://bitbucket.org/chromiumembedded/ ... ew-default
The issue that it's trying to fix is this :
https://bitbucket.org/chromiumembedded/ ... on-history
That issue is still open and it was marked has "has fix". Perhaps because at that time CefRenderProcessHandler::OnBeforeNavigation could be used to block history-related navigations.
https://magpcss.org/ceforum/viewtopic.p ... 810#p25197
https://magpcss.org/ceforum/viewtopic.p ... 310#p26207
However, CefRenderProcessHandler::OnBeforeNavigation was removed from the API a few months ago.
Re: Clear history on page load
So, it seems the only way to clear the current navigation history is to recreate ChromiumWindow control when needed?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Clear history on page load
I haven't used it much and my experience with it is very limited. I use a custom navigation history in BriskBard.
Other user commented that CEF doesn't show old navigation entries from the previous session and all you can see is the list of entries since you executed your application.
You can create a new browser with a new request context and a different cache directory to start with a fresh navigation history without closing your application.
Other user commented that CEF doesn't show old navigation entries from the previous session and all you can see is the list of entries since you executed your application.
You can create a new browser with a new request context and a different cache directory to start with a fresh navigation history without closing your application.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Clear history on page load
I forgot to say that if you or anyone else has C++ experience and is willing to help then you can also create a pull requests in the CEF3 project with your new features and/or fixes.
The CEF3 maintainer always say that pull requests are welcome!
https://bitbucket.org/chromiumembedded/cef
The CEF3 maintainer always say that pull requests are welcome!

https://bitbucket.org/chromiumembedded/cef
Re: Clear history on page load
I will use some of these suggestions then.salvadordf wrote: Wed Feb 06, 2019 8:59 pmYou can create a new browser with a new request context and a different cache directory to start with a fresh navigation history without closing your application.
I am afraid that such a change will require a considerable knowledge of the CEF3 internals, which I do not have yetsalvadordf wrote: Wed Feb 06, 2019 9:15 pm I forgot to say that if you or anyone else has C++ experience and is willing to help then you can also create a pull requests in the CEF3 project with your new features and/or fixes.
