BFCache Chrome devtools

992 views
Skip to first unread message

Aditya Punjani

unread,
Feb 13, 2021, 9:43:29 PM2/13/21
to bfcac...@chromium.org
Hi folks,

What's the latest on the devtools for BFcache that show's eligibility criteria checks for web pages? 

Is there a simple way to identify disqualifiers today? 

Thanks 

Kentaro Hara

unread,
Feb 13, 2021, 10:23:42 PM2/13/21
to Aditya Punjani, Yuzu Saijo, bfcache-dev
+Yuzu Saijo (who is implementing the devtools support)


--
You received this message because you are subscribed to the Google Groups "bfcache-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bfcache-dev...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/bfcache-dev/CAGqOsErjJ9wOsrvLKbe32tRKsdhr26%3D%2B2oNBm1pu4qsNQgY72A%40mail.gmail.com.


--
Kentaro Hara, Tokyo

Steven Carter

unread,
Sep 13, 2021, 3:39:15 PM9/13/21
to bfcache-dev, Kentaro Hara, bfcache-dev, Aditya Punjani, Yuzu Saijo
Was there any update on this?  I've been running into an issue with BFCache that I've been trying to troubleshoot and haven't been able to get the initial state that I expect and would love to have some extra tools to help debug.

Johann Koenig

unread,
Sep 13, 2021, 4:54:56 PM9/13/21
to Steven Carter, bfcache-dev, Kentaro Hara, Aditya Punjani, Yuzu Saijo
If you are running dev or canary I believe the tools should be enabled by default at this point. Otherwise look for an option in chrome:flags

In devtools, click on the Application tab and then scroll down on the left until you see Cache, and Back-forward cache under that. As you navigate between pages, you should see diagnostics there. See below for successful and unsuccessful navigations (apologies if the images do not show up on the mailing list):
Screen Shot 2021-09-13 at 16.49.21.png
Screen Shot 2021-09-13 at 16.51.19.png

Johann Koenig

unread,
Sep 13, 2021, 5:13:27 PM9/13/21
to Carter, Steven, bfcache-dev
On Mon, Sep 13, 2021 at 5:03 PM Carter, Steven <steven...@crateandbarrel.com> wrote:
Is there a lookup to find why a particular page was not handled with the bfcache?  In this instance, the reason given is  BrowsingInstanceNotSwapped, but in searching online, I don't find anything useful that I can do with that to try and remedy the situation.

What platform are you using? That may occur when there are not enough resources to create a new browsing instance and so the current one is re-used. Are you seeing cache misses only for the site you are testing or for all navigations?
 
On Mon, Sep 13, 2021 at 4:00 PM Carter, Steven <steven...@crateandbarrel.com> wrote:
Thank you.  I do have canary and see that located there.
--
Steven Carter
Digital Architect


--
Steven Carter
Digital Architect

Johann Koenig

unread,
Sep 13, 2021, 5:19:36 PM9/13/21
to Carter, Steven, bfcache-dev
On Mon, Sep 13, 2021 at 5:12 PM Johann Koenig <johann...@google.com> wrote:
On Mon, Sep 13, 2021 at 5:03 PM Carter, Steven <steven...@crateandbarrel.com> wrote:
Is there a lookup to find why a particular page was not handled with the bfcache?  In this instance, the reason given is  BrowsingInstanceNotSwapped, but in searching online, I don't find anything useful that I can do with that to try and remedy the situation.

What platform are you using? That may occur when there are not enough resources to create a new browsing instance and so the current one is re-used. Are you seeing cache misses only for the site you are testing or for all navigations?

Johann Koenig

unread,
Sep 13, 2021, 5:25:47 PM9/13/21
to Carter, Steven, bfcache-dev
On Mon, Sep 13, 2021 at 5:21 PM Carter, Steven <steven...@crateandbarrel.com> wrote:
I'm on windows 10.  I also see it on other sites like Walmart.com as well.

Unfortunately I don't have access to a Windows machine at the moment. Does caching fail for all sites? Are there any sites which succeed in using the cache? You can try setting chrome:flags "Back-forward cache" to "Enabled" or "Enabled force caching all sites (experimental)".

Jay Michaelson

unread,
Jun 15, 2022, 9:59:53 AM6/15/22
to bfcache-dev, Johann Koenig, Carter, Steven
I am also getting  BrowsingInstanceNotSwapped but cannot find any inforamtion about this.
Does anyone have any information on this at all?

Fergal Daly

unread,
Jun 15, 2022, 10:21:46 AM6/15/22
to Jay Michaelson, Yuzu Saijo, bfcache-dev, Johann Koenig, Carter, Steven
[+yuzus]

On Wed, 15 Jun 2022 at 23:00, Jay Michaelson <div...@gmail.com> wrote:
I am also getting  BrowsingInstanceNotSwapped but cannot find any inforamtion about this.
Does anyone have any information on this at all?

BrowsingInstanceNotSwapped is not something that should occur on its own. We could do a better job documenting this. A browsing instance swap is an internal operation that is required for BFCache to work. It always happens with cross-site navigations. It can happen with same-site navigations but it's also a little expensive, so if we already know that there is some reason why BFCache cannot happen, then we don't do the swap.

So if you see this, there should always be another reason. If you have a repro case where you see BrowsingInstanceNotSwapped and nothing else that's a bug.

It looks like we don't really document BrowsingInstanceNotSwapped at all but since it does occur in normal usage we should add some documentation,

F

Jay Michaelson

unread,
Jun 15, 2022, 10:33:23 AM6/15/22
to Fergal Daly, Yuzu Saijo, bfcache-dev, Johann Koenig, Carter, Steven
For me it happens on the same site, not cross-site. 
I don't see any reason why it would happen and don't get any other notice about it. I'm sure it's not, but on the surface it seems random, but I wonder what the underlying issue is.

Fergal Daly

unread,
Jun 15, 2022, 10:47:36 AM6/15/22
to Jay Michaelson, Yuzu Saijo, bfcache-dev, Johann Koenig, Carter, Steven
On Wed, 15 Jun 2022 at 23:33, Jay Michaelson <div...@gmail.com> wrote:
For me it happens on the same site, not cross-site. 

Yes it should not happen cross-site.
 
I don't see any reason why it would happen and don't get any other notice about it. I'm sure it's not, but on the surface it seems random, but I wonder what the underlying issue is.

So you're saying that when you see it, it's the only reason listed?

If so, what please send us the URL of the page next time you see it,

F

Jay Michaelson

unread,
Jun 15, 2022, 11:08:54 AM6/15/22
to Fergal Daly, Yuzu Saijo, bfcache-dev, Johann Koenig, Carter, Steven
Yes, it's the only reason listed.

Sending the url is going to be a little bit difficult as it's a dev site, so there isn't really access to it.

I already pushed the changes to the production site, but, on Chrome bfcache isn't working because the site has the App Banner (it's PWA, and the Dev version doesn't have it, that's why it works in the dev version, but not the Prod version).

Chromium seems to be working as expected, so I'm not sure that would be a good example either.
Reply all
Reply to author
Forward
0 new messages