Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Note there's nothing special about closing a browser window. It's the same as closing a tab, from browser's perspective.

This is definitely a non-obvious behavior. Browsers historically were tied to their windows - if you closed them all, there was no browser process running anymore. This seems to have changed some time ago, and doesn't seem to be well-communicated to the users.



Note that the article author is on macOS (using Safari). On macOS, closing the last window does not necessarily close the application and this is an established pattern.


TIL, thanks!


What I mean is: when you have n>1 windows, and close one of them, it's a non-event (unless it was last window / last incognito window). You can even revive the closed tab/window (in Firefox even an incognito tab). By default in Firefox you can revive 25 last closed tabs IIRC (configurable).

Window is just a different UI for a tab. Closing a tab drops some resources from memory, but not all / not immediately.

When you close last window, then you close the whole browser, and the story is different. Closing whole browser = dropping all memory, connections etc.

Note in particular: when you have n>1 incognito windows, they share in-memory cache, cookies etc. (Incognito tabs put more restrictions on certain things than normal tabs, for example no disk writes, but unless you close all incognito windows, stuff still lives there in memory).


Yes, what I mean is what happens when you close the last window. I've been surprised to discover over the past year that both Chrome and Firefox sometimes linger in the background. In case of Fx I suspected it's a bug; Chrome on Windows creates a tray icon under some conditions, that remains after all Chrome windows are closed, so I assume it's deliberate.


Do you have chrome://settings/system Continue running background apps when Google Chrome is closed enabled? I see this pref on Linux and Windows, but not Mac. I believe it's enabled by default…


Hmm never experienced that. Do you have some PWAs installed by any chance?

I know that Opera does stuff like that (some "speed launcher") though.


>This is definitely a non-obvious behavior. Browsers historically were tied to their windows

Maybe in Windows, but as long as OS X has been around, and maybe in classic MacOS (Not sure, wasn't a user) applications have been uncoupled from their windows. Closing the last windows has never closed the application. This isn't surprising, and while it's not obvious, it's not like browser are doing something different than any other application.

In my opinion, this has always been a feature of MacOS. I can close the last window of an application without quitting the application (requiring startup again if I want to open another one).


Yeah, OS X copied this behavior from classic Macs. It’s worked like this for over three decades now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: