The redirections on Google Search Results


The Google search results page is known to have changed fortunes of many websites. With a whole industry dedicated just to get websites as the top results, it sure is one of the most valued assets on the internet.
However, as a regular user, I have often found it irritating that I cannot "copy link location" from the page and send it across to a friend. Instead of the link getting copied, the Google local redirection URL gets copied. Google primarily uses that Url to keep count of user click, but it breaks the right click functionality.
I found this greasemonkey script to fix it. Before we get to the solution, here is a quick gist of what the Google script does. On the search page, every search link is associated with an onmousedown event that calls an rwt() event. This event replaces the href URL with a*/url?...url, hence causing the irritation.
The greasemonkey script tries to nullify this function by attaching another event handler, and restoring the original link location.
This solution however, breaks the "Web History" functionality of Google as Google will now have no clue about the links that have been clicked. Hence, a small enhancement could be to use the XmlHttpRequest object to make a call to the url that the Google script creates while leaving the screen. There is no need to wait for the return of that function as it will only return a HTTP redirect code. Not only does this approach reduce the extra redirect time, it also gives us the correct URL when we copy.
A quick note of the greasemonkey script, it only runs on*. You may want to include your localized google page (* for example) , to make it run on your pages also.