Month: <span>August 2005</span>

The less a man knows about how sausages and laws are made, the easier it is to steal his vote and give him botulism.”


Apparently some time within the last couple of weeks, Google changed the way links work on their search results pages, such that dragging and dropping a link from a search result into another browser window no longer works in Safari. I have yet to test this in other browsers or on Windows, but even this Safari breakage seems pretty irresponsible to me.

So what did they do? It seems that they’ve added an onmousedown JavaScript handler to all of the links on their search result pages. Unfortunately this seems to break Safari’s Drag-n-Drop. The links can no longer be dragged at all because the onmousedown event is trapped before the Drag-n-Drop handler gets to have control of the mouse button event. Whoops!

The onmousedown code looks like this:

<a href=... onmousedown="return asq(event,this,'res','11','')">...

The ‘res’ appears to mean “result”, and the ’11’ is the number of the search result. The first one on the result page is ‘1’, the next is ‘2’, etc.

So what exactly does the asq function do? Well, here it is, formatted so that there’s a chance a sane coder can actually understand what’s going on:

Basically what this seems to do is make a new HTTP GET request to the Google server when you click on a link in the search results. The URL of the request looks like this:[[theResultURL]]&ei=xlkCQ92dIob6sQHLq_zGDg

… With the cd parameter being the index of the search result, and [[theResultURL]] being the URL that the search result links to. I have no idea what the sa and ei parameters mean, though it’s probably safe to assume that sa has something to do with localization and ei is some sort of unique session key.

My best guess is that Google is using… to track click-throughs, presumably so that they can improve the PageRank of the page the search result links to, but this is only a guess.

So I’m left with two questions for Google: How are you using this new click-through data? – and – When the heck do I get my link Drag-n-Drop back in Safari? It’s part of my regular work-flow, and I miss it. Badly.