3 ms·
Well, for one thing, it's in the HTML standard [1]. But also consider websites such as forums that allow users to post custom HTML to a page. Although there is
by ldjb 11y ago
Well, for one thing, it's in the HTML standard [1].
But also consider websites such as forums that allow users to post custom HTML to a page. Although there is often some sanitisation, that often doesn't stretch to removing attributes from <a> tags. In those cases, it might be possible for a user to hijack the sequential links and make them point to some other website.
[1] https://www.w3.org/TR/html/links.html#sequential-link-types https://www.w3.org/TR/html/links.html#sequential-link-types
- detaro 11y agoyour link says: The next keyword may be used with link, a, and area elements of course it is allowed to put it in <link>. And if your badly sanitized HTML (which hopefully did strip the malicious onClick handler ;)) includes an <a rel="" href="">, are we sure that parsers will prefer the <link> in the header? Or will Google and others actively ignore the <a>, despite the standard allowing it on both? That would be useful to know. For simple bots putting it in an easy-to-discover link in <head> might be good, but a search engine and a browser both have to parse the entire page anyways...