-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
link rel=prev not documented as valid token when used with the link element #5591
Comments
It’s an oversight. IMHO maybe the best fix for this would be to drop the entire sentence at https://html.spec.whatwg.org/#the-link-element:concept-supported-tokens-2, as well as the sentence which immediately follows it. The reason is, the first sentence in that paragraph already fully states the relevant normative requirements; that is, this sentence:
The two sentences which follow in that paragraph are simply restating the requirements already given in that first sentence. So I think maybe the best fix would be to do this: diff --git a/source b/source
index d76ca234..507bc391 100644
--- a/source
+++ b/source
@@ -13057,23 +13057,7 @@ <h4 data-dfn-type="element" data-lt="link">The <dfn><code>link</code></dfn> elem
<p><code data-x="attr-link-rel">rel</code>'s
<span data-x="concept-supported-tokens">supported tokens</span> are the keywords defined in
<a href="#linkTypes">HTML link types</a> which are allowed on <code>link</code> elements, impact
- the processing model, and are supported by the user agent. The possible <span
- data-x="concept-supported-tokens">supported tokens</span> are
- <code data-x="rel-alternate">alternate</code>,
- <code data-x="rel-dns-prefetch">dns-prefetch</code>,
- <code data-x="rel-icon">icon</code>,
- <code data-x="rel-modulepreload">modulepreload</code>,
- <code data-x="rel-next">next</code>,
- <code data-x="rel-pingback">pingback</code>,
- <code data-x="rel-preconnect">preconnect</code>,
- <code data-x="rel-prefetch">prefetch</code>,
- <code data-x="rel-preload">preload</code>,
- <code data-x="rel-prerender">prerender</code>,
- <code data-x="rel-search">search</code>, and
- <code data-x="rel-stylesheet">stylesheet</code>.
- <code data-x="attr-link-rel">rel</code>'s <span data-x="concept-supported-tokens">supported
- tokens</span> must only include the tokens from this list that the user agent implements the
- processing model for.</p>
+ the processing model, and are supported by the user agent.</p>
<p class="note">Theoretically a user agent could support the processing model for the <code
data-x="rel-canonical">canonical</code> keyword — if it were a search engine that executed |
@sideshowbarker Thank you for the feedback. This makes total sense to me. These oversights happen so easily and so quickly when one try to maintain essentially the same information in two places. I am happy to make this change. |
I'm not sure I agree with @sideshowbarker's assessment. In particular, the intent of explicitly listing those was to explain which types impact the processing model. Note that
Whereas So I think in fact the confusion in this thread exhibits why the explicit list is helpful; otherwise someone might think that prev should be treated the same as next, whereas in fact they should not be. |
I wonder if that could maybe be better and more clearly achieved by adding explicit “This link type impacts the processing model” and “This link type does not impact the processing model” to the actual descriptions of each link type in the "Link types” section of the spec.
I think maybe the confusion in this thread arises from the spec as currently written being the cause of the confusion, not the alleviation for the confusion.
I would think that adding explicit “This link type impacts the processing model” and “This link type does not impact the processing model” statements to each description of each link type in the “Link types” section could make that much more clear. |
I suppose we could add something explicitly, but I think the spec is already pretty clear in giving processing models or not? E.g. prev does not have one, but next does? Adding explicit sentences saying "The following paragraph is a processing model" doesn't seem like it'd be that helpful... |
I dunno what would be best here. Your explanation in #5591 (comment) made me remember that I already knew this. I vaguely recall us having a related discussion about this at some time when either I was adding a new link type myself, or I was reviewing an addition that somebody else had made. In spite of having already known it previously, I forgot it until it came up again in this discussion now. So I guess it’s hard for me to agree that I think it’s clear Certainly I don’t think it’s likely to be clear to a normal web developer reading the spec — at least not as clear as it could be. |
Perhaps "processing model" could be a dfn that's null by default and then some types set it to something? And then the requirement for |
Perhaps I am misunderstanding something. Why would e.g. If you enter the site for the first time on page 5 and from there's a prev link to page 4, you might very well want the page 4 resource to be prefetched. Is there an assumption here that all browsing is done in page-order? I would challenge that. |
"processing model" means "things the browser does", not "things the user does". The browser does nothing in reaction to |
Isn't the point that And the same may be true of "prev", for those who browse 'backwards' no? |
The same is not true for prev. |
Why would we not want the browser to prepare the 'adjacent' resource in both directions? Why only 'forwards'? |
While the
next
token is documented to be a valid token[https://html.spec.whatwg.org/#attr-link-rel] when used as the value of therel
attribute onlink
,prev
is not.The
prev
token is documented here though https://html.spec.whatwg.org/#link-type-prev. Was this an oversight or hasprev
been deprecated?The text was updated successfully, but these errors were encountered: