cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.82k stars 2.92k forks source link

Same-site BFCache #4059

Open amaitland opened 2 years ago

amaitland commented 2 years ago

Creating this issue to investigate changes introduced by https://bitbucket.org/chromiumembedded/cef/commits/54dd34e19b56a2b7f0d6cb8d473ce36288dcf8e2

BFCache navigations do not trigger the same Chromium notifications as a normal load. To avoid breaking CEF API usage expectations we now synthetically generate the load-related callbacks that would otherwise be missing (OnLoadingStateChange with isLoading=true, OnLoadStart, OnLoadEnd). The |httpStatusCode| argument to OnLoadEnd will be 0 in this case.

LoadUrlAsync needs to be reviewed in light of these changes.

https://github.com/cefsharp/CefSharp/blob/8927a335036125002065ae0f171e7386bf34b45f/CefSharp/WebBrowserExtensions.cs#L443

amaitland commented 2 years ago

First need to confirm that Same-Site BFCache is enabled for the Alloy Runtime (I think it's still disabled by default)

amaitland commented 2 years ago

For the Alloy runtime BFCache is permanently disabled https://github.com/chromiumembedded/cef/blob/4951/libcef/browser/alloy/alloy_browser_host_impl.cc#L1480

As the Chrome runtime will support hosting via a native window handle starting in M102 there's the potential this will still need checking.

Leaving open, removing milestone.