New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link rel="canonical" #2351

Closed
domenic opened this Issue Feb 10, 2017 · 5 comments

Comments

5 participants
@domenic
Member

domenic commented Feb 10, 2017

I was planning to use this today, went to the spec to look up the syntax and any usage notes, and found out that it's not there. It seems like something so useful and widespread should be in the list of link rels in the spec. For example we could say that it's only useful on link, not a/area.

It's already in http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions which states it can be used on a/area, hmm. Maybe we should just leave it there? But why is canonical in the wiki and author in the spec?

See also https://en.wikipedia.org/wiki/Canonical_link_element

/cc @sideshowbarker

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Feb 11, 2017

Member

Maybe @tantek has thoughts on this?

Member

annevk commented Feb 11, 2017

Maybe @tantek has thoughts on this?

@tantek

This comment has been minimized.

Show comment
Hide comment
@tantek

tantek Mar 28, 2017

Member

We have a stub of a spec: http://microformats.org/wiki/rel-canonical which technically anyone can login and edit (all contributions to microformats wiki are covered by CC0 + OWFa, similar to how contributions to Wikipedia are covered by their contribution license).

Update: IIRC @kevinmarks (who worked at Google when rel=canonical was first becoming a thing) has often had a lot to say about rel=canonical, when to use it instead of new rel values etc.

Kevin, want to take a crack at expanding http://microformats.org/wiki/rel-canonical with your thoughts on meaning, usage, when authors should use it, what should browsers, search engines, and other consuming applications do with it?

Member

tantek commented Mar 28, 2017

We have a stub of a spec: http://microformats.org/wiki/rel-canonical which technically anyone can login and edit (all contributions to microformats wiki are covered by CC0 + OWFa, similar to how contributions to Wikipedia are covered by their contribution license).

Update: IIRC @kevinmarks (who worked at Google when rel=canonical was first becoming a thing) has often had a lot to say about rel=canonical, when to use it instead of new rel values etc.

Kevin, want to take a crack at expanding http://microformats.org/wiki/rel-canonical with your thoughts on meaning, usage, when authors should use it, what should browsers, search engines, and other consuming applications do with it?

@tantek

This comment has been minimized.

Show comment
Hide comment
@tantek

tantek Mar 28, 2017

Member

Also re: "something so useful and widespread should be in the list of link rels in the spec" what I remember is that we gave up trying to maintain an explicit in-spec list beyond what went into HTML5 because it became far more "formal" work than necessary. Hence the easy to edit registry instead. If there's a good reason to reconsider growing an explicit list in the HTML spec, I'm not against it, I'd just be curious about what reasoning has changed since we gave up doing that.

Member

tantek commented Mar 28, 2017

Also re: "something so useful and widespread should be in the list of link rels in the spec" what I remember is that we gave up trying to maintain an explicit in-spec list beyond what went into HTML5 because it became far more "formal" work than necessary. Hence the easy to edit registry instead. If there's a good reason to reconsider growing an explicit list in the HTML spec, I'm not against it, I'd just be curious about what reasoning has changed since we gave up doing that.

@kevinmarks

This comment has been minimized.

Show comment
Hide comment
@kevinmarks

kevinmarks Mar 28, 2017

I've updated http://microformats.org/wiki/rel-canonical with a more thorough description and discussion - further edits welcomed.

kevinmarks commented Mar 28, 2017

I've updated http://microformats.org/wiki/rel-canonical with a more thorough description and discussion - further edits welcomed.

@sideshowbarker

This comment has been minimized.

Show comment
Hide comment
@sideshowbarker

sideshowbarker Apr 6, 2017

Member

I added a use counter to the W3C HTML checker to collect data on usage of rel keywords. That has so far recorded data on 1,268,156 unique documents checked. Based on that data, the table below ranks the keywords based on how often they were found among those 1,268,156 documents.

As the table shows, canonical was found in almost 32% of the documents checked, and that makes canonical the third-most-commonly-used rel keyword—just after stylesheet and icon.


Rank Keyword Number Percent
1 stylesheet 1060847 83.65%
2 icon 712571 56.19%
3 canonical 402446 31.73%
4 alternate 377532 29.77%
5 nofollow 296259 23.36%
6 dns-prefetch 162899 12.85%
7 pingback 139291 10.98%
8 next 83834 6.61%
9 search 78826 6.21%
10 bookmark 66861 5.27%
11 tag 66103 5.21%
12 prev 58764 4.63%
13 author 42907 3.38%
14 external 20615 1.63%
15 preconnect 17217 1.35%
16 noopener 10560 0.83%
17 preload 8370 0.66%
18 license 7220 0.57%
19 noreferrer 7078 0.56%
20 prefetch 4869 0.04%
21 help 2966 0.02%
22 prerender 760 0.01%
23 serviceworker 0 0.00%
Member

sideshowbarker commented Apr 6, 2017

I added a use counter to the W3C HTML checker to collect data on usage of rel keywords. That has so far recorded data on 1,268,156 unique documents checked. Based on that data, the table below ranks the keywords based on how often they were found among those 1,268,156 documents.

As the table shows, canonical was found in almost 32% of the documents checked, and that makes canonical the third-most-commonly-used rel keyword—just after stylesheet and icon.


Rank Keyword Number Percent
1 stylesheet 1060847 83.65%
2 icon 712571 56.19%
3 canonical 402446 31.73%
4 alternate 377532 29.77%
5 nofollow 296259 23.36%
6 dns-prefetch 162899 12.85%
7 pingback 139291 10.98%
8 next 83834 6.61%
9 search 78826 6.21%
10 bookmark 66861 5.27%
11 tag 66103 5.21%
12 prev 58764 4.63%
13 author 42907 3.38%
14 external 20615 1.63%
15 preconnect 17217 1.35%
16 noopener 10560 0.83%
17 preload 8370 0.66%
18 license 7220 0.57%
19 noreferrer 7078 0.56%
20 prefetch 4869 0.04%
21 help 2966 0.02%
22 prerender 760 0.01%
23 serviceworker 0 0.00%

sideshowbarker added a commit that referenced this issue Apr 6, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the `rel` attribute for the `link` element.

Fixes #2351

sideshowbarker added a commit that referenced this issue Apr 6, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the `rel` attribute for the `link` element.

Fixes #2351

sideshowbarker added a commit that referenced this issue Apr 6, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the `rel` attribute for the `link` element.

Fixes #2351

@domenic domenic closed this in #2511 Apr 12, 2017

domenic added a commit that referenced this issue Apr 12, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the rel="" attribute for the <link> element.

Fixes #2351.

inikulin added a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the rel="" attribute for the <link> element.

Fixes #2351.

inikulin added a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017

Make <link rel=canonical> a standard rel keyword
This change adds “canonical” to the HTML spec as a standard keyword
allowed in the value of the rel="" attribute for the <link> element.

Fixes #2351.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment