Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

suspending javascript on non active tabs

1,856 views
Skip to first unread message

Gelomida

unread,
Feb 26, 2012, 1:48:10 PM2/26/12
to
Hi,

I wondered, whether there is a feature / plugin, which would suspend
javascript of all tabs, except the active one.

I surf often with multiple tabs.
Unfortunateyl some pages have rather intrusive / CPU intensive
javascript animations or periodic Ajax request, which I do not care for
as long as the tab is not visible.

I would like to be sure, that the other tabs do not 'eat' my CPU.

permanently disabling javascript for some tabs is not the solution, as
lots of pages will no more be operational if javascript is disable.

However suspending javascript execution, while a tab is not visble and
resuming as soom as the tab is active again would be perfect for my
purposes.

Is tis techincally possible with Firefox (suspending Javascripts of tabs)?

»Q«

unread,
Feb 26, 2012, 2:13:17 PM2/26/12
to
On Sun, 26 Feb 2012 19:48:10 +0100
Gelomida <gelo...@gmail.com> wrote:

> I would like to be sure, that the other tabs do not 'eat' my CPU.
>
> permanently disabling javascript for some tabs is not the solution, as
> lots of pages will no more be operational if javascript is disable.
>
> However suspending javascript execution, while a tab is not visble and
> resuming as soom as the tab is active again would be perfect for my
> purposes.
>
> Is tis techincally possible with Firefox (suspending Javascripts of
> tabs)?

It should be technically possible, but I can't find any way to do it
automatically. The closest thing I found is an extension that lets you
toggle javascript on/off per-tab, with a button,
<https://addons.mozilla.org/en-US/firefox/addon/tab-permissions/>.
Note I haven't tried it so I don't know how well it works. Hopefully
someone else will come along with a solution that doesn't require so
much clicking.

Ant

unread,
Feb 26, 2012, 3:21:51 PM2/26/12
to
How about PrefBar extension: http://prefbar.tuxfamily.org/ ? However,
you will have turn off JS, in its tab, before going to the web pages to
stop its JS.


On 2/26/2012 10:48 AM PT, Gelomida typed:
--
"Not all ants use violence to dominate their world, some use more subtle
methods..." --E.O. Wilson on NOVA
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.

Chris Ilias

unread,
Feb 26, 2012, 8:19:39 PM2/26/12
to
On 12-02-26 1:48 PM, _Gelomida_ spoke thusly:
How about a workaround?
1. Go to Edit-->Preferences-->General.
2. Check mark "Don't load tabs until selected".

When you're having this problem, just restart Firefox, and restore your
previous session.

--
Chris Ilias <http://ilias.ca>
Mailing list/Newsgroup moderator

Ralph Fox

unread,
Feb 27, 2012, 12:43:16 AM2/27/12
to
Setting the preference "dom.min_background_timeout_value"
to a very large number will suspend timer-driven javascript
on inactive tabs (in Firefox 5 and later).


--
Kind regards
Ralph


Gelomida

unread,
Feb 27, 2012, 4:52:40 PM2/27/12
to
Hi Chris Thanks for your anser.

This workaround won't work for what I am looking at.


I try to explain my typical scenario.
Open web page in a tab(e.g. Facebook, or similiar ones with banner
adds, and Ajax contents, which is polled for on a regular basis)

For certain tasks I open up to 8 tabs for this site.
Now each of these tabs will try to update banner ads / and parts of
their contents.

I on the other side do not really care for any contents of inactive tabs
to be updated.
in fact I would even like any flash contents or streaming media contents
of non selected tabs to stop.
Sometimes when googling for some tech info I open potentially
interesting links in multiple tabs.
As some people prefer to make videos of tech soultions, which they could
have explained in three sentences I have sometimes multiple videos
trying to play at the same time

Same when googling for youtube entries and opening them in multiple tabs.

My brain is not capable of listening to multiple songs / videos at the
same time, additionally, though my PC is multi tasking capable it is
also challenged by above explained scenarios,



Gelomida

unread,
Feb 27, 2012, 5:09:56 PM2/27/12
to
Hi Ralph,

That sounds like an intersting solution.

I'll try it out.

If I understand correctly, then setting this value will be the smallest
possible allowed timeoutvalue, that will be used by a javascript in an
inactive tab.

Next things I want to investigate:
- Do animated gifs in non active tabs still 'animate' if yes, how to
stop them?
- Any trick to suspend flash in inactive tabs.


Ant

unread,
Feb 28, 2012, 8:00:32 AM2/28/12
to
On 2/27/2012 2:09 PM PT, Gelomida typed:

> - Any trick to suspend flash in inactive tabs.

How about using FlashBlock extension and just clicking on them when you
want to see them? That's how I do it.
--
"An ant hole may collapse an embankment." --Japanese

Gelomida

unread,
Feb 29, 2012, 5:00:56 PM2/29/12
to
On 02/28/2012 02:00 PM, Ant wrote:
> On 2/27/2012 2:09 PM PT, Gelomida typed:
>
>> - Any trick to suspend flash in inactive tabs.
>
> How about using FlashBlock extension and just clicking on them when you
> want to see them? That's how I do it.

Yes this might be an option.I used this extension a few years ago and I
abandoned it.
The reason at this time was, that some sites were no more working (Even
when I clicked on all the flash icons of the mentioned site)


I might re-install Flashblock and see if it (or the sites) are behaving
nicer.
Your suggestion will get rid of all annoying flash videos.


However This will not solve the problem when opening multiple tabs with
html 5 audio /video contents.


Any solutions for avoiding multiple audios with HTML5
0 new messages