Feature Request: disabling javascript on background tabs
Feature Request: disabling javascript on background tabs
I'm not certain if this is feasible with noscript or whether it would have to be done by the core FF team, but it certainly fits within noscript's functionality area.
Basically, I got really tired of FF always running such a high CPU usage with a lot of tabs open and started thinking about what could help prevent or ease it from happening. While I'm sure a part of it is FF itself, I also suspect that a (large?) portion of that processing time is javascript on various pages eating cycles.
What I am proposing is that in addition to the current restrictions on what domains noscript lets javascript run from there should also be an option to suspend javascript execution in background tabs until they come to the foreground again (with a whitelist of course). This would prevent any pages you want to keep around to reference (but don't care about interim javascript functionality) from eating CPU cycles. Hopefully this is a) a good idea and b) feasible. Thanks for reading.
Basically, I got really tired of FF always running such a high CPU usage with a lot of tabs open and started thinking about what could help prevent or ease it from happening. While I'm sure a part of it is FF itself, I also suspect that a (large?) portion of that processing time is javascript on various pages eating cycles.
What I am proposing is that in addition to the current restrictions on what domains noscript lets javascript run from there should also be an option to suspend javascript execution in background tabs until they come to the foreground again (with a whitelist of course). This would prevent any pages you want to keep around to reference (but don't care about interim javascript functionality) from eating CPU cycles. Hopefully this is a) a good idea and b) feasible. Thanks for reading.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4) Gecko/20090423 Firefox/3.5b4
Re: Feature Request: disabling javascript on background tabs
I support this totally, it makes good sense. Please see my comment to a related post in the Development forum "run scripts only on active tab"
Here's hoping!
Here's hoping!
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729) AutoPager/0.5.2.2 (http://www.teesoft.info/)
Re: Feature Request: disabling javascript on background tabs
I understand and agree with the intent of this request, but I think it has some security implications. Many secure web sites use JavaScript timeouts to track when you are idle and automatically log you out. So, for example, if you log into your bank, switch to another window/tab, and then leave your computer for 30 minutes, anyone that sits at the keyboard can switch back to your bank's tab and access your account.
To do this properly, what you need is for JavaScript and DOM to adopt a "sleep"/"unsleep" API. Without such an API for scripts to implement, you would have to force applications to sleep/unsleep without their knowledge which could lead to unknown, and perhaps unsafe, effects.
-Foam
To do this properly, what you need is for JavaScript and DOM to adopt a "sleep"/"unsleep" API. Without such an API for scripts to implement, you would have to force applications to sleep/unsleep without their knowledge which could lead to unknown, and perhaps unsafe, effects.
-Foam
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Re: Feature Request: disabling javascript on background tabs
I certainly agree with the concept of disabling javascript on background tabs. Whether or not to do so automatically, may be an issue, but at least the option to use a button the tab bar or elsewhere would be a nice addition for times when Firefox is just sitting at 50% or more processor usage with many tabs open, as I am wont to do. The security issue mentioned shouldn't be a problem since NoScript can handle scripting on a site by site basis. The main issue here is that we would be able to trim down and control which tabs are grabbing our processor power.
I want this badly and may just try GreaseMonkey to achieve it.
I want this badly and may just try GreaseMonkey to achieve it.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12
-
- Ambassador
- Posts: 1586
- Joined: Fri Mar 20, 2009 4:47 am
- Location: Colorado, USA
Re: Feature Request: disabling javascript on background tabs
The Tab Mix Plus extension supports turning off JavaScript for individual tabs. Right-click > Permissionsmikell wrote:the option to use a button the tab bar or elsewhere would be a nice addition for times when Firefox is just sitting at 50% or more processor usage with many tabs open, as I am wont to do.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Re: Feature Request: disabling javascript on background tabs
If you have 50 tabs open, finding which tab is using cpu time is very difficult, which is why I want a single button to temporarily disable all javascript (at least) in background tabs (or all tabs). Otherwise I, and many others, would love to have some way of showing which tabs are hogging cpu resources. I know I can use different extensions to disable javascript in any specific tab, but finding the tab can be very hard to do.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12
-
- Ambassador
- Posts: 1586
- Joined: Fri Mar 20, 2009 4:47 am
- Location: Colorado, USA
Re: Feature Request: disabling javascript on background tabs
I figured you'd say that. The QuickJava extension supports disabling JavaScript for all tabs with one click on a status bar icon. Would that help at all?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Re: Feature Request: disabling javascript on background tabs
Thanks for the referral. I did install QuickJava and, as expected, the disable buttons are helpful, reducing the CPU usage to near zero when pressede, especially when scripting has (perhaps unwittingly) sort of hijacked FF, but they still do not help determine which tab is offending. That still seems to require going from one tab to the next and closing them and reopening them if they are not the culprit. Furthermore, even when I finally find the tab (http://www.ecnmag.com/article.aspx?id=1 ... on=effzone in this case) I haven't even been able to disable the ticker tape display of news which is the problem, using NoScript, other than perhaps applying noScripting to the entire site, which I haven't yet tried to see if it's still usable that way.
I still wish most for some kind of indicator for which page has a CPU hogging script running.
I still wish most for some kind of indicator for which page has a CPU hogging script running.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12
-
- Ambassador
- Posts: 1586
- Joined: Fri Mar 20, 2009 4:47 am
- Location: Colorado, USA
Re: Feature Request: disabling javascript on background tabs
The Adblock Plus extension blocks those tickers if you use the following filter:mikell wrote:Furthermore, even when I finally find the tab (http://www.ecnmag.com/article.aspx?id=1 ... on=effzone in this case) I haven't even been able to disable the ticker tape display of news which is the problem, using NoScript, other than perhaps applying noScripting to the entire site, which I haven't yet tried to see if it's still usable that way.
Code: Select all
http://www.ecnmag.com/RSSPRNewsWire.aspx
That's a common request. I bet if you search bugzilla, you'll find it officially requested already.I still wish most for some kind of indicator for which page has a CPU hogging script running.
Edit: By the way, I'm sorry I didn't notice this earlier, but you need a Firefox update. We registered users can see the user agent string your browser sends. It indicates you are running an obsolete version of Firefox. It's easier to troubleshoot these issues if you're using the current version. Also, it's risky to use an old version of Firefox which has known, published, unpatched vulnerabilities. NoScript is a useful security tool, but even more effective is running with an up-to-date Firefox. Help > Check for Updates.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Re: Feature Request: disabling javascript on background tabs
OK, I might be somewhat receptive to this or a similar idea.
How about providing some instances where something like this would be beneficial?
The "marquee". Thats one.
Once you've Allowed a Flash Object, it will remain, regardless of JavaScript settings, so no help there.
Animated GIFs would not be affected, so again no help.
Now what else?
How about providing some instances where something like this would be beneficial?
The "marquee". Thats one.
Once you've Allowed a Flash Object, it will remain, regardless of JavaScript settings, so no help there.
Animated GIFs would not be affected, so again no help.
Now what else?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17