Access page in bfcache without unfreezing it

Hi, is it possible to access and view the DOM of the previous page? I wrote a longer text and accidentally moved away from that page. Now if I click the “back” button in the browser, the previous page will reload and all data will be lost. But right now I am sure it is still in memory. I just cannot seem to find a way to access it. Any ideas?

And I am not talking about a webpage’s javascript accessing a previous page, which I guess is not allowed for security reasons. I am talking about me as a user/developer. I saved the whole browser memory already with gdb, but obviously it’s unreadable. Maybe it’s saved to disk somewhere? Maybe a web developer tools feature exists?

Thanks :slight_smile:

hm, no one? I would also be happy if I could access it with an API and then write my own extension for that.

there’s no built-in way to do this with DevTools.
Could you tell us what’s your use case?

Like I wrote above, it’s in case one writes a text in a webpage and accidentally clicks a link that moves away from the page (and the page not warning about it first, like some do). It happened every now and then to me, but this time the text I lost is too valuable. I froze the browser with killall -20 and won’t shutdown the computer anymore until I know what’s possible. So if I have to write an extension, it’s fine with me. I would just need an API.

I now went through, the devtools protocol api, searched the internet - and… found absolutely nothing to access anything in bfcache :frowning: there are lots of “user” articles how to disable the cache, find reasons why it wasn’t used, etc. but nothing for browser/extension developers. What did I miss?