this post was submitted on 24 Sep 2024
49 points (98.0% liked)

Firefox

17937 readers
38 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

I have recently realized that I will occasionally hear notification sounds from applications that I had previously opened but no longer has any active tabs (email client, discord, etc.). I'm assuming this means they are allowed to keep some sort of connection in the background until I close all Firefox windows. Is this a bug or a "feature"? How do I turn it off? I don't want any application running at any capacity except when I have tab(s) open for them.

Solution:

Hm, Discord didn't have anything registered there. After some digging, I found about:debugging#workers which does list Discord stuff under "Other Workers". It's unsettling to see there's no way to force confirmation and/or disable these stuff. I use Discord when I have to every once in a while. I don't want their code running all the time in my browser..

edit: you can disable service workers with dom.serviceWorkers.enabled = false but this has no effect on Other Workers.

edit2: uBlock can disable Other Workers by setting the filter ||$csp=worker-src 'none' in My Filters and enabling Suspend network activity until all filter lists are loaded in Filter lists. It funny how this "trick" is written for Chromium-based browsers with the note that Firefox allows global disabling of service workers when the sites can just register a different type of worker with no way of disabling them. I am sure the api is less powerful than service workers bla bla bla, let me decide what runs on my browser without needing third party tools, please.

top 13 comments
sorted by: hot top controversial new old
[–] pietervdvn@lemmy.ml 15 points 2 months ago (2 children)

This is a browser feature called 'service workers' which indeed allows websites to keep a process running for e.g. notifications.and pending updates.

Can be highly annoying. Visit ‘about:serviceworkers‘ to see the installed ones.

[–] 18_24_61_b_17_17_4@lemmy.world 2 points 2 months ago (1 children)

Can I remove these without issue? I have a shocking amount of them.

[–] pietervdvn@lemmy.ml 1 points 1 month ago

Yeah, but there is no button to remove all of them at once. And the next time you'll visit the site, they'll just get installed again - so I don't think it is very useful to delete them.

[–] Quail4789@lemmy.ml 1 points 1 month ago* (last edited 1 month ago)

Hm, Discord didn't have anything registered there. After some digging, I found about:debugging#workers which does list Discord stuff under "Other Workers". It's unsettling to see there's no way to force confirmation and/or disable these stuff. I use Discord when I have to every once in a while. I don't want their code running all the time in my browser..

edit: you can disable service workers with dom.serviceWorkers.enabled = false but this has no effect on Other Workers.

edit2: uBlock can disable Other Workers by setting the filter ||$csp=worker-src 'none' in My Filters and enabling Suspend network activity until all filter lists are loaded in Filter lists. It funny how this "trick" is written for Chromium-based browsers with the note that Firefox allows global disabling of service workers when the sites can just register a different type of worker with no way of disabling them. I am sure the api is less powerful than service workers bla bla bla, let me decide what runs on my browser without needing third party tools, please.

[–] FiniteLooper@lemm.ee 7 points 2 months ago (1 children)

I think you just have to open those sites and turn off notifications for them. I would hope there’s a more fine grained option somewhere to say “only when the tab ids open” but if there is, I don’t know about it.

[–] Quail4789@lemmy.ml 2 points 2 months ago

I have notifications turned off globally. The notifications I'm getting are in-app notifications.

[–] sunoc@sh.itjust.works 3 points 2 months ago

I had similar unexpected behavior with a closed Telegram tab. Feels weird and a bit worrying that stuff is allowed to run in the background like that.

[–] RisingSwell@lemmy.dbzer0.com 3 points 2 months ago

I have a bad connection and I find that a closed tab will still finish what it was doing before you closed it, could be related.

[–] lemmyvore@feddit.nl 3 points 2 months ago

Try using an addon like Basic Automatic Tabs Unloader, it will kill tabs completely a while after they've been closed. You can set the grace period as low as you want.

The Firefox native tab unloader is extremely permissive and only kills tabs when the whole system starts running low on RAM.

[–] sun_is_ra@sh.itjust.works 1 points 2 months ago

Happened to me too. Hopefully, there will be explaination

[–] SatoruToru@sh.itjust.works 1 points 2 months ago (1 children)

I just freeze all my apps that I don't need to run in the background and also restricted them from autostarting, running in the background, etc. in the battery settings. I'm not sure if this is a good solution, but it's how I do it.

[–] Fisch@discuss.tchncs.de 1 points 2 months ago

I think OP is having this issue on PC

[–] sunzu2@thebrainbin.org 1 points 2 months ago

Noticed similar thing when browser App is closed but service is still connected to the websites after it has been closed.

WTF is the point of the closing if shot still "finishing" its a fucking Java script jfc