I've been experimenting and exploring a few ways to implement this for my own browser [1].
The options seem to be:
- Great Suspender style suspension [2] - swap page with a simple low memory placeholder and reload back (detecting interactions)
- Chrome/FF style tab discarding (only happens with memory pressure) [this post and 3]
- Optimistic unloading with screenshots (this is what we're experimenting with) - we suspend the tab and replace it with a screenshot of the tab before it was suspended, you trigger a reload if you need it. It seems that the screenshot gives you access to the information you cared about while being easy to unload and reload from memory and making it much less likely you actually trigger a reload.
One final one I've been thinking about that I haven't gotten around to testing yet for fast-fan-syndrome (and non-memory limited systems) is to just use renice/cputhrottle (in macOS for example) to force CPU share limits on the processes. This has portability issues and requires certain privileges which is why I'm hesitant to try it immediately.
These obviously have their issues like stopping the JS VM when there might be long running thing that was actually desired (usually prevented with a whitelist).
Happy to test any other ways you think might work!
[1] https://synth.app
[2] https://chrome.google.com/webstore/detail/the-great-suspende...
[3] https://developers.google.com/web/updates/2015/09/tab-discar...