3 ms·
Looks like Bing fires an AJAX call on the onmousedown, instead of rewriting the URL. What are the benefits of the two solutions, given that both rely on Javasc
by ot 15y ago
Looks like Bing fires an AJAX call on the onmousedown, instead of rewriting the URL.
What are the benefits of the two solutions, given that both rely on Javascript? Maybe an AJAX call could be cancelled when browser follows the link?
P.S. I believe Google has been doing rewriting since long before 2011, IIRC.
- saurik 15y agoAs mentioned in the article, Google's solution causes an inability to "right click"->"copy link address"; it also makes going to the result by clicking on it much slower (as you must synchronously go through Google's servers, causing multiple packet round trips).
- ot 15y agoYes I understand that, I was wondering if Google's solution has any benefits. Otherwise the onmousedown solution (which Google abandoned) would be strictly superior.
- saurik 15y agoGoogle's method does not, in fact, require JavaScript support (whether or not Google chooses to only use it when JavaScript is available); that would be its primary advantage. It also may be more reliable on some browsers (as it does not rely on the browser keeping the previous page's scripts and requests operating as you move to the next page). Honestly, given the behavior of when Google chooses to deploy this feature, I believe it to be an unintended bug. I believe that Google's intention with these links is for them to work as normal: to be simple <a href="http://example.com/> http://example.com/>, and to only change as you click on them to go to the next page. This would then explain why they require JavaScript: in order to pull off the feat of having the link work correctly normally but only change as you click it requires JavaScript; that then explains why they only serve this to clients that have JavaScript. If you check the link out: they actually are shipped from Google as simple anchor tags. They they have an "onmousedown" that converts the link to a Google indirect URL only as they are clicked. With the caveat that this makes clicking the links really slow (due to the synchronous round trips to Google that sometimes even fail due to SPDY), this would seem to be ideal behavior. However, right-clicking the URL, or clicking on the link and dragging it, also cause the link to be changed to the indirect URL. This could very well have simply been an oversight: a mistake caused months (even years) after they originally deployed this feature, and no one noticed or remembered it shouldn't work like that. (edit: Hacker News seriously won't let me put a closing " on the href= of my <a> example tag... :(.)
- jonknee 15y agoI would be shocked if it was a bug. Search is their main product and the linked results are a huge part of it.
- saurik 15y agoWell, under the assumption that it is a bug, it is one of those really subtle ones that doesn't affect the vast majority of people (most people don't even realize you can right click a link and copy it; even fewer care when the result they copy/paste isn't the URL of the destination page as long as the result works if someone else clicks on it). Let me alternatively put it this way: for the same reason (that search is their main product, that linked results are a huge part of it, and that theoretically they care a lot to make the experience of that work really well), I'd be shocked if this isn't a "bug"... the idea that this behavior would be considered a feature is simply awkward. That said, I now have managed to find a reference (linked above in this thread) to someone from the Google Analytics team describing why the /url feature was put into place, and it definitely sounds like something that wasn't given /that/ much thought. (Specifically, that they broke analytics tracking systems, including Google Analytics, when they launched the AJAX search results pages: hash anchors are not sent as part of a Referer:. It then sounds as if the Analytics team sent a nastygram to the search team, who threw in a patch to make the Analytics team stop yelling at them. ;P)
- jonknee 15y agoI think it has to do with Google Instant. They redirect so that the referrer is accurate. With Instant and without a redirect you could have different search terms in the URL that would be sent as a referrer.