5 ms·
The post is written in a way that might mislead some into thinking that 1) connections are kept after closing the browser, 2) connections are kept indefinitely.
by jakub_g 6y ago
The post is written in a way that might mislead some into thinking that 1) connections are kept after closing the browser, 2) connections are kept indefinitely.
This is not true:
- Firefox keeps it for ~2 minutes and Chrome for ~5 minutes [1].
- Note there's nothing special about closing a browser window. It's the same as closing a tab, from browser's perspective. Many things are kept for a while in memory as well.
[1] https://fastmail.blog/2011/06/28/http-keep-alive-connection-timeouts/ https://fastmail.blog/2011/06/28/http-keep-alive-connection-... (blog post is 10 year old but the values were the same last time I checked)
- TeMPOraL 6y ago> 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.
- jakub_g 6y agoWhat 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).
- TeMPOraL 6y agoYes, 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.
- jakub_g 6y agoHmm never experienced that. Do you have some PWAs installed by any chance? I know that Opera does stuff like that (some "speed launcher") though.
- abrowne 6y agoDo 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…
- fuzzy2 6y agoNote 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.
- jakub_g 6y agoTIL, thanks!
- thesuitonym 6y ago>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).
- wolfgang42 6y agoYeah, OS X copied this behavior from classic Macs. It’s worked like this for over three decades now.
- jakub_g 6y agoBTW: new cold connection latency over HTTPS is brutal, takes 4 RTT. Over high-latency connection, it can take much longer than server download time of the resource. https://blog.cloudflare.com/introducing-0-rtt/ https://blog.cloudflare.com/introducing-0-rtt/