r/firefox • • 3d ago

Solved Massive cpu usage by blocking gstatic

I hope this is the correct place to ask. Because of privacy concerns I am blocking gstatic with the NoScript extension. Opening a video page on youtube (not on the homepage though) leads to constant massive cpu load which disappears on allowing gstatic. In the network tab I see hundreds of blocked requests to gstatic per second, which I assume is the culprit.

Is there any way to fix this without just allowing it? Maybe block it somehow differently? gstatic is quite the notorious tracker, allowing it permanently is not an option.

0 Upvotes

18 comments sorted by

5

u/SSUPII on 3d ago

Gstatic is the main Google CND for images, scripts, and other general assets. Youtube is currently surviving on your system thanks to them being cached, but scripts especially are updated daily and another script is infinitely retrying on failure to update.

Youtube will eventually break if you don't let it update its assets. Either allow it or don't use the official Youtube frontend.

1

u/12Emil34 3d ago

This is not the case, I have been blocking it for months at this point. Until now I didnt really care, but now I am running demanding applications and have it in the background so it became an issue.

1

u/Anon-7878 3d ago

You're triggering a retry loop because yt expects to load a resource from gstatic. What's the exact URL in network tab? You could use uBO to block individual requests instead of noscript blocking the entire domain.

1

u/12Emil34 3d ago

In the request header youtube.com is listed as origin and referer, gstatic.com as host. If that is what you mean with exact URL

1

u/Anon-7878 3d ago

Not the request headers. In the network tab rightclick one of the blocked gstatic requests and select copy > copy URL. You're looking for the full url, including the file path to see exactly what resource yt is trying to load.

1

u/12Emil34 3d ago

Thx The url is of the form gstatic.com/youtube/.../...json. Which I want to add to a whitelist while blocking all other urls of the gstatic domain, right? Didnt know this was possible in uBO

1

u/Anon-7878 3d ago

Ye mang. In uBO dashboard filters add

||gstatic.com^$domain=youtube.com

Then add

@@ADDURL$domain=youtube.com

Replace ADDURL with the complete URL you copied from the network tab. Then allow gstatic in noscript first, otherwise it'll override what you're trying to do. This way uBO blocks all other gstatic requests from yt while allowing that specific json file.

1

u/12Emil34 3d ago

You even gave the full syntax thank you <3

1

u/Anon-7878 3d ago

you're welcome :]

0

u/FckXFckMusk 3d ago

Maybe block the .js file that has the code that does this

0

u/12Emil34 3d ago

Do you mean the site that is making the request? That would be youtube.com, this breaks the site completly.

0

u/FckXFckMusk 3d ago

>In the network tab I see hundreds of blocked requests to gstatic per second, which I assume is the culprit.

You need to find the script that is making thoe requests and prevent from being downloaded.

2

u/12Emil34 3d ago

In the request header youtube.com is listed as origin and referer, gstatic.com as host. It wants to fetch a .json.

You need to find the script that is making thoe requests

as in the specific script that youtube.com loads? How would I do that?

-5

u/AnyPortInAHurricane 3d ago

you want to engage on the most public place in the universe but maintain 100% privacy ?

no one cares what you're doing

3

u/FinGamer678Nikoboi 3d ago

no one cares what you're doing

That is objectively false. Your attention is the most valuable thing on the internet. 💀

EVERY major tech company cares and wants full control over what you're doing.

0

u/AnyPortInAHurricane 3d ago

of course, but so what ? are they coming into your house and holding a pistol to your head ?

3

u/xp_fun 3d ago

And the reward for the worst take goes to ...

-2

u/AnyPortInAHurricane 3d ago

and the reward for most paranoid goes to ...