|
|
|
|
|
by JD557
3039 days ago
|
|
Most browsers already send you a warning if the main thread appears to be blocked. Maybe they could also add a warning like: > This page is consuming a lot of resources, do you want to keep executing JavaScript on this page? > Stop / Allow only this time / Allow always |
|
On the other hand if you set it too high then those websites will aim for that limit to maximize profit without triggering the warning. You'll still waste a ton of resources and you've only mitigated the issue somewhat.
I'm not saying it's impossible, just that "just add a dialog when CPU usage is high" might be a bit naive. There's a subtle balance to these things.