I discovered something weird today. I’ve known for some time that you can get Flickr’s short link for an image if you view > source. It’s usually about 20-odd lines into the page.
I was making a comment on this picture by one of my contacts, Ali-Berko, and wanted to include reference to one of my own images in my comment. So I found my image, looked at the source and got the following:
<link id="shorturl" rev="canonical" type="text/html" href="http://flic.kr/p/64KX3U">
On the line above this, there was also the canonical link to my page:
<link id="canonicalurl" rel="canonical" href="http://www.flickr.com/photos/rugbymadgirl/3324308332/">
So far, so good. But then I wanted to post a message to Twitter referencing Ali’s image and went looking for the short url in her page sourcecode. Could I find it? Nope. Just, around line 21:
<link id="canonicalurl" rel="canonical" href="http://www.flickr.com/photos/35082628@N06/5543790810/">
Rats, I thought, where’s it gone? I tried looking at other images from my contacts and people I didn’t know. None of the people I know as contacts showed the short url when I looked at the page source. But people I didn’t know had the link in the code. How weird.
It’s only whilst writing this blog post that I’ve actually figured out what was going on… It’s to do with Flickr’s new link appending to tell the page “where you’ve come from”. For instance, if I look at: http://www.flickr.com/photos/35082628@N06/5543790810/in/pool-1606325@N22/ and view the source, I just get the long canonical link as before. BUT – backtracking and removing the “/in/pool/…” bit of the URL, http://www.flickr.com/photos/35082628@N06/5543790810/ and hey, presto! the short url is in the code:
<link id="shorturl" rev="canonical" type="text/html" href="http://flic.kr/p/9rTnSb">
Similar things were happening when I navigated to other shots which had “/in/contacts/” on the end.
Whilst this may be obvious with hindsight, it’s pretty confusing for the user. Flickr’s new page design (full of Ajaxy goodness, apparently), re-writes the URL on the fly (adding or removing the “/in/whatever/…” part depending on which of the “filmstrip” navigation aids you have opened on the RHS of the page. I’d never noticed this before. And that’s the ONLY part of the Photo Details page which appears to change.
So, it’s easy to get tripped up and wonder why the short URL is not visible in the HTML source. Now I know, I’ll be wise to it in future. But I wonder how many other folks are confused by it? (OK, it’s probably just me!). 😉