Friday, September 24, 2010 [Tweets] [Favorites]

JavaScript Off

Michel Fortin:

I’ve been browsing the web with Javascript turned off more and more frequently lately. While to a web developer this might look like I’m crippling the user experience, to me most of the time I find it more pleasurable. Even though I’m on a Core 2 Duo, websites are noticeably faster with Javascript turned off.

I gave up on this some years ago. In practice, too many sites require JavaScript or work much less smoothly without it.

4 Comments

"I gave up on this some years ago. In practice, too many sites require JavaScript or work much less smoothly without it."

I turned off Javascript in my default browser around 1998, and I've never been even slightly interested in turning it back on.

Why?

Beyond the obvious speed, privacy, security, and aesthetic improvements you get by disabling JavaScript, most important to me is that I often let tabs stay open for weeks until I get around to them, and JavaScript just eats up CPU cycles on background tabs. With JavaScript disabled, I can have 20 - 200 tabs open in my browser, and still never have my browser eating up more than 1% of CPU while idle. If you're working on your desktop Mac, it means a faster computer. And if you're working on a laptop Mac, it means a cool laptop without fans blaring.

Now, as Michael notes, many sites do indeed require JavaScript for basic functionality. (Although you'd be surprised how low a percentage of sites actually do need JavaScript. Well more than 95% of the sites I encounter give me all the functionality I need without JavaScript.) So what's my workflow?

1) Employ two browsers.

This is the only really crucial step.

In my workflow, I use OmniWeb as my default browser, and when I encounter I page where I need JS, I just open the site in Safari. I have a dead simple AppleScript tied to a keyshortcut that automates the task. With a modern Mac and a SSD, Safari will be well into rendering the page a fraction of a second after I trigger the keyshortcut.

(OmniWeb's site specific prefs also allow me to let a handful of highly trusted, resource friendly, and frequently used sites enable JS in my default browser. So, I let a few folks like Amazon and Apple use JS in my default browser. But I shy away from that practice as a rule, since, as stated, I don't want days old background tabs eating up CPU cycles, even from those trusted sites. In short, site-specific prefs do make JS-free surfing a bit easier, but you don't need site-specific prefs to make this work.)

2) Employ a custom URL handler

I've got a dead simple faceless stay-open AppleScript app that handles URL's for sites I commonly visit that really do require JS.

For example, my handler works so that yournamesafari://http://www.youtube.com will open in Safari, even though OmniWeb is my default browser. Not only can I use such URL's as bookmarks in my default browser and still have them launch in Safari, but I can also drag the URL's to the Finder to create inetloc files. Either way, they get picked up by Spotlight, LaunchBar, and Quicksilver. So I can just type "youtube" in my launcher of choice, and have the site launch in full JS glory in Safari, again in a fraction of a second.

-----

Those two steps took me less than a couple of hours to set up, and I reap the benefits every time I'm using my Mac.

Thanks for the comments, Chucky. I do use OmniWeb and Firefox in certain circumstances, but for most Web work I prefer Safari. Maybe I should try setting up site-specific WebKit browsers with different preferences. Another issue with disabling JavaScript is that sometimes it isn’t clear what you’re missing.

"Another issue with disabling JavaScript is that sometimes it isn’t clear what you’re missing."

While I surf 97.5% of the time with JS disabled, I generally at least briefly visit many sites with JS enabled.

And I'd say that, for the great majority of the time, it's pretty obvious what's you're missing on any particular page with JS disabled. Photos won't pop open. Video players don't work. Disclosure triangles don't disclose. Links do nothing and end in a "#". Entire features refuse to load.

In short, an educated user will almost always know what they're missing, and be able to hit a keyshortcut to instantly fire up the page in full JS enabled glory, if they so wish. The failures are obvious.

The only real 'non-advertised' feature I've been clueless about missing while surfing with JS disabled is text entry boxes that suggest stuff as you type. For example, I'd have totally missed the recent kerfuffle about the new suggest-as-you-type addition to Google Search if I hadn't been a reader of the tech press. Since I do my Googling with JS disabled, I'd never have noticed the change.

In Firefox I make use of NoScript since it allows both whitelisting and blacklisting, lets you do the same for frames and plug-ins and is loaded up with security features to protect from XSS vulnerabilities and clickjacking among other things.

About plug-ins/frames: if you use ClickToFlash, the experience with blocking plug-ins/frames is the same, if you want to see that object/frame, just click it.

For most websites, JavaScript simply isn’t needed. On the other hand, many websites are making regular use of JavaScript where it simply *isn’t* needed lately, the worst of these are page links that use JavaScript simply to go to page 2. Those are annoying, but I figure privacy, security and reserving CPU/RAM for other apps is a bit more important than websites that hate the user/reader.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment