-
Looking into it properly, it looks like Facebook do exactly this to protect users from spam/bad links. Link
They describe simply doing this (if you're using jQuery):
function linkShim($link) { var dest = $link.data('href'), via = $link.attr('href'); $link.on('mouseover', function() { this.href = dest; }).on('mousedown', function() { this.href = via; }); } $('a.external').each(function() { linkShim($(this)); });
Although, what you say about Google's penalisation for it sounds most likely correct — I can't find any decent/official word on it anywhere?
Hmmm...
-
https://support.google.com/webmasters/answer/2721217?hl=en
Though Facebook won't care as they like being a walled garden.
And Twitter won't care, as Google have a deal with them to get raw tweets via their firehose.
If you've got a good example of this code I'll look into it.
The window.status has long been deprecated for security reasons, and Google seem to do it via lots of obfuscated JavaScript.
What I don't want to do is put something in that is half-baked and proves to physically break links that work today.