|
|
|
|
|
by bogidon
1714 days ago
|
|
I was surprised recently to learn about the back/forward cache (bfcache) [1], a common browser optimization that sort of does what you're describing but stores a more complete snapshot of the page, including the JS heap. I'm not sure if it's used in this new FF feature (the article doesn't give details about the mechanism of unloading). However the bfcache unsurprisingly causes edge cases in JS-heavy pages/SPAs, and a prevailing solution [2] is for the page to force a reload when it is restored from this cache rather than explicitly handling those edge cases, nullifying the optimization. [1] https://web.dev/bfcache/ [2] https://stackoverflow.com/a/13123626/14665201 |
|