Feb 7

Browsing the Web Comfortably on your Mac [updated 7 Feb 2010]

In a little over three years I’ve gone to being almost a full-time Apple user. I still have a PC for playing games and a few other uses, but it stays off almost all the time. Most everything else is done on my iMac. And when I’m on the computer there’s usually a browser window open1.

I like Firefox’s extensions, especially adblock plus and flashblock, but the Firfox experience on the Mac is severely lacking. Camino is more mac-like but still feels…weird, I don’t know how else to put it. It’s just not right for me.

Safari works beautifully, except for the lack of extensibility to really make it mine (and no, I don’t mean “skinning” the UI). I have SIMBL installed so SafariStand can save my tabs for the inevitable crash or force quit (lots of tabs open for lots of time leads to some sticky situations), but SIMBL is a hack2.

Here’s the three things my browsing experience can’t live without now that I’ve found them:

1. Glimmerblocker is an http proxy that runs in the background. It intercepts calls made the the outgoing port of your computer and if they match the blacklist, doesn’t send them on. This is different than an inputmanager to the browser as it sees it as a failed request (the server is down) instead of a modified system command.

Glimmerblocker installs as a System Preference and includes Sparkle for self-updating (if desired). It can’t interact with your browser, as adblock plus does, so right clicking a site won’t allow you to view ads, but you can modify the filters in System Preferences. Some non-annoying ad services (eg. The Deck) are not blocked automagically, so sites that use those services can still get their ads through and you can still support them.

[Updated] I installed a few additions to the default glimmerblocker filters. For Gawker-media sites (gizmodo, io9, lifehacker) and nymag.com I added a global transform “gb.zapScriptElements();”. I don’t know what else it breaks, but it strips their damn comments off. Caveat emptor, blah blah.

2. clicktoflash is relatively new (at least to me, but it seems like it is to everyone as well – the original google code project is gone so I don’t know how long it’s been around). It installs as a legitimate Webkit plugin (like Flash or Java). When a page loads with a flash movie, clicktoflash intercepts the call and draws a grey box with a flash symbol inside. When you click the box the flash loads and plays normally4. This automatically disables the most annoying of ads and causes many sites to render faster (initially).

Clicktoflash has an installer that also uninstalls and updates the program. [update: you can also remove the clicktoflash.plugin from ~/Library/Internet Plugins and restart Safari to remove it.] If you right-click, or Control-click, a flash box clicktoflash will allow you to whitelist that site so the movies always load, or edit the whitelist (to remove a site).

Clicktoflash solves an annoying problem (to me) where a site throws an exception because their servers aren’t up to snuff to stream video. It also keeps network monitors from constantly requesting permission to load outside sources to a page6.

3. A custom css file that tries to ditch as many comments as possible. The social web reveals just how much most people should be punched in the throat at a constant rate until they stop making noises. There are exceptions, but, unfortunately, they are few and far, far, between.

Mine looks like this Feel free to use it, but please notice that I’m standing on the shoulders of giants: Mark Damon Hughes and Steven Frank. I modified stevenf’s to not be self-updating, but he’s a cool cat and trustworthy so feel free to trust his version. I just prefer to have only myself to blame if stuff doesn’t work right.

I wrote it in Textmate (textedit works fine too), named it wikihide.css and threw it in my Documents folder. Then, in Safari > Preferences > Advanced, I chose it and it alters every website that contains those style calls.

But what does it do? The first two alter Wikipedia to remove the annoying boxes at the top that tell you if an article is under consideration for cutting, or if it needs sources, etc. I can usually tell a fradulent article pretty quickly, so now I can just get to the meat of the article right away. The others modify facebook so it appears relatively ad-free. I had some others in there, but it broke the UI and made facebook unusable. I’m not on there that much but all the ads to tone my abs, make $$$ off real-estate and free government grants and win free MBPs were grating. [UPDATED: the previous still holds, the file is commented]

Now my web browsing is much cleaner and more pleasant. I can still support sites through ad-viewing, by choice, and damn the rest.

1 One, with many, many tabs.

2 It usually works fine, but if something goes wrong somewhere with any program the interference from an input manager will throw all chance of tracking down the issue out the window.3

3 SIMBL, and all input managers, intercept all calls to the system and parse them to see if they need to act. If it relates to their function they alter the system call and send on their modified version. If I installed this surreptitiously on your computer it’s called a trojan or spyware.

4 More information here. How this works means that at some point people will start programming to avoid it I’m sure, but for now and the immediate future5 it helps a lot.

5 And what more do we really have on the internet than the immediate future?

6 An idea that should be smashed with all haste. [begin rant] If I embed a video from youtube the user has to click to view it, implying permission to visit youtube’s server and download the relevant data. If I embed an akamai stream it loads silently in the site so it appears it comes from my server and not from somewhere else. With S3 et. al. getting so inexpensive I’m sure this will continue to be an issue (for me at least), but injecting data into a website from an outside source should be considered a security threat and not a goal. [end rant]