It would be a good idea if Firefox had a feature where if you turn it on, websites from a list that people have reported to not need JavaScript (static websites) would have JavaScript turned off by default to
1.Save a huge amount of memory (pictures of memory usage are attached)
2.Make it pretty much impossible to fingerprint or track users across the internet if they are using a VPN (Since the IP address is one of the only identifiers that can be collected without JavaScript) unless the website uses cookies and you turn off your VPN, or the VPN is the one selling your network traffic data to these websites.
3.Prevent most modern ads, trackers, and paywalls from loading since they depend on JavaScript in order to be loaded in. (Ads have been getting so bad that even the FBI recommends ad-blockers for user safety.)
4.Protect users from exploits and vulnerabilities since the JavaScript code that they need to function isn't being compiled or executed, meaning less security breaches and more privacy and security on the internet.
5.Get rid of annoying website features that ruin the overall user experience or could pose a risk to user safety (like Google AI summaries/Unwanted AI integration (It's been forced on people who don't want it, and it's been telling people to jump off the golden bridge to cure depression), Over-cluttered User interfaces that use a lot of memory, Ads that are invasive/dangerous/sexually-explicit/illegal/disgusting/political/propaganda and/or prevent users from being able to look at information or access certain features, Paywalls that block information unless you pay for it, and other invasive/dangerous/illegal/unwanted features)
And in the occasion where a website doesn't work, an accessible JavaScript toggle and a report button should be implemented (some websites like Google, Duckduckgo, Facebook, or Reddit have old/no-JavaScript versions of the website that are designed for people who have JavaScript disabled, so if a website doesn't work, either have JavaScript on for that website, or if an old version is available that doesn't need JavaScript, do a redirect).
This would be a great feature for privacy, security, saving memory, ad-blocking, removing bad/unsafe features, and blocking ads/JavaScript features that show illegal/sexually-explicit/dangerous/addictive/disgusting/political/propaganda content.
References (and some other resources):
https://www.ic3.gov/PSA/2022/PSA221221
https://www.techworm.net/2024/05/ai-google-search-drink-urine-jump-bridge.html
https://x.com/Real_Ed_McCray/status/1851086441847132617