3 ms·
What do the background tabs do with server side events or websockets? You should be able to just open a connection and send a message over WS or have the server
by akiselev 6y ago
What do the background tabs do with server side events or websockets? You should be able to just open a connection and send a message over WS or have the server drop the connection on every tick. You can probably do it without a server by hitting an address that will blackhole the connection instead of refusing it and use an AbortController [1] to timeout the request.
[1] https://developer.mozilla.org/en-US/docs/Web/API/AbortController https://developer.mozilla.org/en-US/docs/Web/API/AbortContro...
- Aardwolf 6y agoThe question is mainly about a client-side game, no multiplayer or servers. Here is some context (just a random thread about the issue, threads like this pop up regularly): https://www.reddit.com/r/incremental_games/comments/j86u5m/google_chrome_background_tab_throttling_causing/ https://www.reddit.com/r/incremental_games/comments/j86u5m/g... 5 years ago such games worked in background tabs. Then browsers started throttling background tabs (for understandable reasons) and everyone learned to keep it in a foreground tab in a window you don't use. Now the latter will also stop working.
- sildur 6y agoI'm tired of too-smart browsers, I want a dumb one.