Friday, 25 January 2002 : "Browser feature request"Browser feature request: I'd like to be able to turn JavaScript on or off per browser window instead of for all open browser windows. I'd also like the on/off switch to be accessible via a button on the toolbar or a keyboard shortcut so as to make the change a quick and easy operation.Motive: I hate surfing with JavaScript enabled on general principle; the number of sites that abuse the ability to programmatically affect your browsing experience is rather greater than the number of sites that do useful and/or unobtrusively helpful things with it. Not to mention that it's still possible for Badly-Written JavaScript to crash my browser (or that the browser is at fault when handling Good JavaScript; either way the experience sucks). There are those sites, however, which require JavaScript to be on in order to be fully accessible. Say, weblogs that require you to have it enabled to even view others' comments [boo hiss], or pages that use JavaScript to pull content from another address into a page. (At least one LiveJournal I know of does this; without JavaScript it's a blank box in the middle). These sites aren't really bad, because it's a safe assumption that the visitor has it turned on (90%+ of surfers do based on stats from some of my sites); I just wish I could visit them without having to go through the "oh yeah, I need to turn that on don't I" dance. Often it's just easier not to visit. Then there are the sites that show you absolutely nothing on the home page unless it's activated and have no message at all to indicate to the average, non-programmer visitor what the problem is. (TMBG, I'm looking at you.) I'd like to be able to enable such sites to work without opening myself up to risks from other windows I may open while visiting the first site; thus the wish for per-window activation. If this were implemented, one could imagine having a set of sites you could 'trust' to run JavaScript by default but leave it off for all others, or ask per site where it's detected, or whatever. This is done in some browsers for cookies now; the interface would not be so different for making JavaScript activation decisions. And for the 90%+ of people who don't care, it could of course have an 'always on' option. I imagine this is a complicated thing to ask, but there it is. Maybe in version 9 browsers... Weaker, compromise position: I would be partially mollified by a toolbar button or keystroke to turn on/off JavaScript for all browser windows without having to open the bloody preferences window every time it comes up (a three-step process at minimum). This should be relatively trivial for browser vendors to implement compared to the above. Related coding note: This technique [found via Kottke] was very useful when I had to make a JavaScript-enabled banner ad but wanted to keep it as backwards-compatible as possible (that is, browsers with JavaScript off get to see a real link instead of something useless like "#"). Replies: 6 comments so far Can't you do that in I.E. now? I'm running it on a Mac, but even in my version I can add sites to my "Trusted" Security Zone, set it to a custom level, and then turn off scripting for it. Granted, it's a lot more hassle than the methods you mention, but it works. (My Linux boy tells me that Konqueror and Opera have this functionality as well.) Posted by Kris @ 01/25/2002 06:32PM est * What he said! My browser of choice (Galeon) allows per-site filtering of images and cookies, but not javascript. It does let me toggle javascript directly in the menu bar (and that means I can easily assign a keyboard shortcut for it if I want), but it's a global option, not a per-window option. It wouldn't be hard to add the per-site stuff to the javascript filtering though. I imagine it'll show up fairly soon. Posted by Seth @ 01/25/2002 07:30PM est * Just looked in my Mac IE preferences again... Well, glory be. I had seen the 'Security Zones' section before but the interface was so opaque that it never was clear to me what in fact its capabilities were, and it sure didn't seem worth finding out. It's not exactly what I expected (and it's so obscured I don't imagine more than a few tenths of a percent of the user base actually use it), but in the end it will give me most of what I want. Thanks! I'll write it up for the front page in the next day or two. Posted by Steve @ 01/26/2002 12:05PM est * I use mozilla, and have it set to not allow sites to open windows on their own. This gets rid of the majorly annoying JavaScript issues for me and lets me browse with JavaScript turned on. I've created a feature request for the per-window idea, though. Steve, if you're interested, you can add yourself to the CC on this bug: http://bugzilla.mozilla.org/show_bug.cgi?id=122007 and you'll get email whenever something happens with it. It might take a while, but if the feature catches the eye of an interested mozilla developer, you could see the feature show up sooner. My C/C++ is too rusty (circa high school) for me to even think about trying to implement it. -matt Posted by matt @ 01/26/2002 01:50PM est * http://www.xulplanet.com/downloads/view.cgi?category=applications&view=prefbar turns out you can install some xpi to do this already. -matt Posted by matt @ 01/27/2002 01:11PM est * Allow me to put on my "reactionary *nix bigot" hat for a minute: one tool per job! This really isn't the sort of function that belongs in the browser level; it belongs in a filtering proxy. But since that would probably be too much work for 99.96% of the population to mess with, I suppose putting something of this nature into the browser wouldn't be a Bad Thing. 8^)= Posted by John Anderson @ 01/28/2002 08:25AM est | Links, exploration and synthesis from Steve Bogart photo by my wife If you want to be e-mailed when there's new stuff here, say "add me." Archives by week
Older Archives: 2001 (Aug-present) 2001 (Jan-Aug) 2000 | 1999 | 1998 Medley/AllTooCozy Entropy Genehack rc3.org GirlHacker LarkFarm Search log since Aug. 2001: Ye olde Amazon wish list How's my HTML? How's my CSS? |