Often I have lots of tabs open.

Often, these tabs can be seen cheerfully burbling away, doing whatever snake stuff Google thinks it should be doing on my system.

I then check my IDS to see what happened. This process gets a bit tiresome, and during my thoughts on this general topic it occurred to me to ask:

Is there a way to have javascript only work for the tab in focus?

For example, on this page we are looking at, javascript would be working, but on all other tabs, nada.

Is this even possible?

  • Interesting question, definitely. But is there any specific reason why you'd want this feature?
    – slhck
    May 8, 2011 at 17:37
  • Yes. I reread the story of the tabnabbing attack for one, and Task Manager often shows tabs accessing network resources, and really, if i'm not using them, then why even bother? Much more to the point, I don't need a 'reason' to want to alter behaviours that I find unpleasant on my system. I'm open minded though. Is there a specific reason why I should not contest this loss of autonomy?
    – chiggsy
    May 8, 2011 at 17:57
  • Well, most "major" websites who tend to use network resources in the background are those who reload items without the entire page having to be reloaded. That is also the reason why they keep running all the time. Pages like this are Google Reader/Mail, Gizmodo, Facebook and so on. Disabling Javascript as soon as you switch away from the current tab would could lead to some issues such as timing problems, event handling, connection loss of these tabs. Gmail Example: To receive new mails in your webapp, you have to ACTIVELY switch to the gmail tab. May 8, 2011 at 18:39
  • To add to the gmail example: You'd probably kill features such as uploading files once you switch away from the tab you are currently uploading your file in, but that might possibly not be an issue May 8, 2011 at 18:40
  • (I know very little of Chrome.) This is the only "NoScript"-like extension I have heard of for Chrome, though don't know if it will do what you want, "NotScripts" chrome.google.com/webstore/detail/… ?
    – therube
    May 8, 2011 at 19:16

1 Answer 1


No. The current Chromium Extensions API is very restrictive which leads to poor extensions for Chrome (Compared to Firefox). The solution is to use Firefox4 or Waterfox4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.