Back / Forward Cache
by Chris Dumez
- Objectives
- Make pages suspendable most of the time (~98%)
- Allow for much faster back/forward navigation
- Means addressing most failures to suspend, not introducing new ones
- ActiveDOMObject
- Largest cause of failures
- Need to drop all shouldPreventEnteringBackForwardCache_DEPRECATED() overrides
- Queue tasks on the event loop for running script (e.g. event dispatch, promise resolution)
- Pause CPU-intensive work (e.g. animations) in suspend() and unpause it in resume()
- Abort work that cannot be paused in suspend() and make sure tasks to dispatch relevant error events are queued on the event loop
- Dedicated Workers
- Dedicated workers have their whole thread suspended when entering the back/forward cache
- ActiveDOMObject::suspend() / resume() do not get called
- Service Workers
- Service workers cannot be easily suspended because they can be shared
- When a client page goes into the back/forward cache, it gets disconnected as a client of the service worker
- When a service worker no longer has any clients, it is terminated
Last modified
5 years ago
Last modified on Nov 1, 2019, 1:49:29 PM
Note:
See TracWiki
for help on using the wiki.