sienori / Tab-Session-Manager

WebExtensions for restoring and saving window / tab states
https://tab-session-manager.sienori.com/
Mozilla Public License 2.0
1.87k stars 182 forks source link

Restoring session on start, new ideas on restore options #1308

Open devtweakr opened 6 months ago

devtweakr commented 6 months ago

In my case I have 8 chromium windows containing one tab each. When I set the settings to open startup session, first the browser opens the default 1 window and then the Tab-Session-Manager kicks in replacing the default opened window and opens all other windows. The position of first window restored by Tab-Session-Manager is now on position of default window, which is not correct.

I think on startup session should close the initial default window and then restore all session windows.

New ideas:

For getting chrome browsers to open exactly the way they were, I had a little workaround. Instead of closing the browser the normal way, I was just killing the chrome processes (pkill chrome) and when I restart the browser, it restored the session exactly where I left off.

(Note: in chrome settings start-up "Continue where you left off" must be selected).

This works with Chrome, Chromium, Brave, Vivaldi. To me it seems chrome based browsers have some kind of built-in session restore mechanism which seems to work flawlessly (in case the browser processes are forcefully killed).

There might be one more interesting option to explore... how chrome retains exact session info with tabs and windows positions in the background in case of crash, and restores it perfectly on start-up. Maybe it is possible to make an extension which could use this built-in mechanism for save and restore this perfect "session snapshot"

cheers