News for hackers. Stuff that matters.
Re:Reducing power consumption for background tabs by alkonaut on Wednesday March 15, 2017 @03:17PM (#13878914)
How much benefit is there in doing anything at all on a background tab? Would there be many use cases where simply suspending the background tab threads would lead to a much worse user experience?

I wouldn't mind having my background Netflix just stop, or having to wait a few secs for an interval refresh after bringing a tab to front.

But seeing as this seems an active area of research and debate I have a feeling that this solution has drawbacks I'm not considering...

Re:Reducing power consumption for background tabs by advisedwang on Wednesday March 15, 2017 @03:45PM (#13879150)
There are use cases such as a webmail client still fetching messages so it can notify (e.g. via browser tab icons), or so that a collaborative editor keeps up with changes.

Even consider the typical hackernews demo of a javascript genetic algorithm: you probably want to be able to leave it to run for a while while you do other things without being required to keep the tab visible.

Re:Reducing power consumption for background tabs by r00fus on Wednesday March 15, 2017 @04:10PM (#13879347)
So let the user promote these with pinned tabs. I think that's a reasonable compromise.
Re:Reducing power consumption for background tabs by chongli on Wednesday March 15, 2017 @04:44PM (#13879599)
Browsers have notification APIs now, from what I've seen. No need to run a full background tab just to handle the occasional notification.
Re:Reducing power consumption for background tabs by apetresc on Wednesday March 15, 2017 @09:10PM (#13881505)
Those notification APIs still get triggered by Javascript running in those tabs. As far as I know, there's no equivalent to the mobile notification APIs where there's a single dedicated socket listening to a central server.
Re:Reducing power consumption for background tabs by kalleboo on Thursday March 16, 2017 @01:24AM (#13882746)
Safari's notifications can use the Apple push notifications server the same way iOS apps do.
Re:Reducing power consumption for background tabs by apetresc on Thursday March 16, 2017 @11:38AM (#13885898)
Ah, that's pretty cool. Still, I don't think any of the other browsers have it that way, and Safari's desktop market share is ~2%.
Re:Reducing power consumption for background tabs by bri3d on Wednesday March 15, 2017 @05:05PM (#13879777)
Productivity application clients like a spreadsheet or document editor tend to do best when they can receive commands/updates to the document in the background via something like a WebSocket.

Otherwise, each time you switched tabs to your spreadsheet, doc, slide show, etc., it would have to poll for changes from the server in some fashion, and wait for a response. This gets pretty frustrating when you're trying to do something like copy from one document to another.

Re:Reducing power consumption for background tabs by mdpopescu on Thursday March 16, 2017 @12:40PM (#13886440)
During competitions I sometimes watch two twitch streams in two different tabs, turning just the sound on and off depending on which one is more interesting. (I had up to four open at the same time.)