Snap.com provides popup link previews

Opinion
Nov 27, 20063 mins

* Snap.com uses JavaScript code for thumbnail previews of target pages

Here’s an interesting concept: Add a fragment of JavaScript code to a Web page and whenever you hover your mouse over a link on that page a balloon pops up showing a thumbnail preview of the target page. That neat idea has been implemented and made available, for free, by Snap.com, an Idealab company.

After you sign up you are asked for the domain to be supported and your e-mail address. Then you are presented with a JavaScript code fragment such as this:

type=”text/javascript” src=”http://spa.snap.com/snap_preview_anywhere.js?

ap=1&

key=SAMPLE_KEY&

sb=1&

domain=www.example.com”>

By default the balloon includes a search bar, which can be switched off by setting the value of “sb” to “0”.

The “normal” behavior of this code is to make all links on a page show the Snap.com link preview popups but you can exclude specific links by adding a ‘snap_nopreview’ class:

www.example.com

You can also suppress link preview popups on all links except those specified by setting the value of “ap” to “0” and add a ‘snap_preview’ class to all links that are to be previewable:

www.example.com

Snap also provides code to suppress link preview popups for all internal links.

How Snap.com’s link preview popups work is via the Snap.com server. The Snap.com server creates the thumbnails after the first time they are requested using the code they provide. Snap.com then delivers them on demand. This process can result in thumbnails not being ready for a few hours after the first request because the snapshots of the target pages have not been processed. Snap.com claims to have snapshotted some 25 million pages so far.

You can see a test of the Snap.com system on Gibbsblog where only one link has been enabled to show a preview.

There are a few problems with this system, links to pages that change frequently will often show thumbnails of older versions and if you want to use their code to suppress previews of internal links you must be able to add the code to the body tag for it to have full access to all links on a displayed page.

Minor problems aside this is a cool idea and could be a useful addition to all sorts of Web content, for example, where you are redirecting users of your content to other sites so they can preview where they are going.