Cross-browser testing is crucial when developing Web sites, but it can be a royal pain to have to refresh each browser across several devices to see how pages are rendered. To help cut down on the pain, there's Shim, a Node.js app that lets you sync browsing sessions over several devices on the same Wi-Fi network. All you need is Node.js, Shim and a Mac running 10.6 or better with wired and wireless connections.

About Shim

Shim came from the Boston Globe Media Lab as a way of testing Boston Globe sites across different browsers. It's written by Chris Marstall, who holds the "creative technologist" title at the Globe and was released on GitHub after requests to make it available outside the Boston Globe Media Lab.

It works by using a Mac's Internet Sharing feature and using it as a transparent proxy for all the other machines on the network. So you need to connect all the devices you want to test to the shared Wi-Fi network, while connecting to the Internet on the Mac via Ethernet.

Traffic is redirected to the Node.js server that you'll run on the Mac, and when you bring up a new URL on the Mac it's sent to all the connected browsers.

Using Shim

To start using Shim, you'll need a Mac with 10.6 or later running Node.js. Note that the Shim README points to some outdated Node.js packages on a Google sites page. I'd head over to the official Node.js site instead if you don't have Node.js running on your Mac already.

Then grab Shim from GitHub and run the setup, configure Internet Sharing and restart the Mac. You then need to run the configure_proxy.sh script and then start Shim with node shim.js.

One Shim is running, connect to the Mac's Wi-Fi and surf over to Google with every device you want to use Shim on. You don't need to install anything on the client computers, so long as they have a reasonably modern browser that supports JavaScript. (So you probably won't be able to use Shim with, say, w3m. Sorry.) When you search for "attach" in Google, Shim will redirect browsers to the URL that the main system is browsing. There's also a bookmarklet on the Shim homepage that you can use.

Shim has a couple of other nifty features that are of interest. For example, Shim shares cookies between browsers. You should be able to log into a site and have that login persist across other sessions, assuming the site uses cookies for logins.

You can also use Shim for slideshows, so instead of testing you could use Shim to display a slideshow to multiple users. See the README for more on how to use Shim.

One note on the license. There doesn't seem to be one, except asking that the "About Shim" section be left in the README file. If you're using Shim, this shouldn't be any real cause for concern. If you're thinking of distributing Shim, though, that might make legal a bit nervous. It'd be nice if the Globe folks would pick a well-known and OSI approved license.

There's also the small matter of requiring a Mac to use Shim, of course. Many Web developers may have Macs, but not everybody. It'd be great if someone hacked Shim to run on Linux and Windows, too.

Aside from that, Shim seems like quite a handy little project. Anybody using it for testing yet?