Eli White's Gravatar Eli White's Profile

About Me:

Last 10 Comments

1

Your explanation misses a few, I think important, pieces.

1) You say that rel="alternate shorter" means the 'same thing' as rev="canonical" ... not 'quite' true by the way that the HTML standard works. The 'rel' version here, just means that "Hey here is another URL that happens to be a shorter version for this page. The rev="canonical" however, is saying that the specific URL you happen to be on, *IS* the canonical URL, and that the other URL you specify just happens to be another version of it. (Which the proposal is assuming it will be a shorter one)

2) The rev="" nomenclature is deprecated in HTML 5, and therefore if we are adding something 'new', we should really avoid it.

But really:

3) The statement rev="canonical" can really ONLY exist on a webpage served under the true canonical URL of a page. If you are on another URL that happens to bring up the same page, then you cannot/shouldnot include it. Afterall, that tag is claiming that the URL you are at, IS the canonical one.

But what this means, is that it's less useful. Especially in cases, such as for example php.net. The canonical URL of something on php.net might look like: http://php.net/manual/en/security.php ... However, you will never actually be served HTML under that canonical URL, instead you are auto-redirected to a mirror, such as: http://us3.php.net/manual/en/security.php ...

So since you never serve HTML under the real canonical URL, you never have a proper location to put a rev="canonical". You wouldn't put that on the us3.php.net page, because that hostname is certainly not the canonical one.

To that end, the rel="alternate shorter" is a much better (IMO) standard. Because that standard doesn't make a 'claim' about canonical-ness at all. It just states in the simplest form: "Hey, want a shortened URL for this page? Use this one" Which in this case, is http://php.net/security

So, you HAVE to have the rel="alternate shorter" syntax anyway, to allow for showing a shortened URL when not ON the canonical URL in the first place.

So why bother having the rev="canonical" in the first place? It's less generically useful, you can always just use the rel="alternate shorter" version anyway ... plus it's not HTML 5 compliant anyway.

Posted in /blog/2009/apr/save-the-internet-with-rev-canonical.

Fri, 10 Apr 2009 at 14:15:46: Link


Stats

  • Member Since: 18 Sep 2007
  • Comments: 1

Web Site

eliw.com

Blog Posts


Work and Books

Analog Essential PHP Security HTTP Developer's Handbook