37

Is there a way to permanently disable the Google Chrome session restore (see screenshot)?

It appears at almost every system start. Not everytime, which makes it difficult to reproduce. Also, I could not notice any relation to whether there was a previous crash or not.

enter image description here

EDIT 1:

Version in use: Google Chrome 68.0.3440.75

Socrates
  • 587

6 Answers6

15

Edit the file located at C:\Users\username\AppData\Local\Google\Chrome\User Data\Default

Right click "Preference" file and click edit. ctrl+f to find the following values, and change the value to:

"exit_type": "none",

"exited_cleanly":true,

Save the file, and change the attribute to "read only" so chrome can't change it back.

Thomas B.
  • 374
7

Chrome has a special flag to disable session restore window. But be aware options in chrome://flags are experimental and you may lose browser data or compromise your security or privacy.

Follow these steps:

  • Open Chrome.
  • Type chrome://flags/#infinite-session-restore in address bar (Crtl+L).
  • Click on the right drop-down menu and change the 'Default' value to 'Disable'. Then restart Chrome to apply that setting.

So what does this do? That option says -- "Reduces the number of tabs being loaded simultaneously during session restore, to improve responsiveness of the foreground tab". After disabling and restating Chrome, it relaunches chrome.exe with --disable-features=InfiniteSessionRestore option.

Biswapriyo
  • 11,584
7

After @Biswarpriyo s Answer don't work anymore (the flag got removed), it is possible to start Chrome (tried it with 86.0.4240) with the --disable-session-crashed-bubble parameter.

For Linux: Just add it after the command in terminal. For example: chrome --disable-session-crashed-bubble

For Windows: You have to create a shortcut to chrome.exe (usually located in C:\Program Files (x86)\Google\Chrome\Application\ ) and add it to the target like described here

Leon D
  • 217
2

See my answer on how I resolved this for the Chromium on a raspberry pi.

https://superuser.com/a/1643107/690627

Basically

su
(note: super-user remain in current user path, now using relative to local path)
chattr  +i  .config/chromium/Default/Preferences
chattr  +i  .config/chromium/'Local State'

Meryan
  • 232
0

In 2024/05 Linux Version 125.0.6422.141 (Official Build) (64-bit)...

neither chrome://flags/#infinite-session-restore nor (flatpak version) --disable-session-crashed-bubble seems to work.

I finally created a session autostart invoked script to clear up the Preferences file manually each time.

# Clear annoying Chrome "Restore Pages" nag.
sed -i 's/\"exit_type\":\"Crashed\"/\"exit_type\":\"Normal\"/g' \
    "/home/myuser/.var/app/com.google.Chrome/config/google-chrome/Default/Preferences"
capella
  • 21
0

I learned it's different on windows now:

Using Chrome on windows it's:

 --hide-crash-restore-bubble

Using Chromium on Windows or Chromium on Linux

--disable-session-crashed-bubble 

I would also add no first run and disable infobars if you are using it in a kisok-like mode where you don't want any chrome alerts for the

 --no-first-run --disable-infobars