3 ms·
HN tries to use canonical addresses. In the page source two canonical addresses are provided, the first is: <link itemprop="url" rel="canonical" href="http:/
by Jtsummers 5y ago
HN tries to use canonical addresses. In the page source two canonical addresses are provided, the first is:
<link itemprop="url" rel="canonical" href="http://kk.org">
And the second is the correct one:
<link rel='canonical' href='https://kk.org/thetechnium/class-1-class-2-problems/' />
I'm imagining HN takes the first, always, and doesn't use any extra logic to try and discern (when there are multiple) which should be used.
- dang 5y agoHmm that's a new one. Anyone know how to figure out which canonical URL should be used?
- pvg 5y agothere's some useful stuff that pops up if you google 'itemprop' and 'canonical' but the rel-and-itemprop-at-once thing seems to be out of spec https://html.spec.whatwg.org/multipage/semantics.html#the-link-element:names:-the-itemprop-attribute https://html.spec.whatwg.org/multipage/semantics.html#the-li... Doesn't really help too much with which one is the url to use but the link rel one is more righteous.