3

Before anything else, yes, Google no longer takes note of rel prev / next and has not done so (officially) for nearly a year. Google officially deprecated rel prev / next as a crawl / indexing factor on March 21st, 2019:

Unofficially, Google stopped taking note of rel prev / next several years before that.

But, as with any web document meta information, just because Google isn't using rel prev / next, doesn't mean it no longer represents useful library information.

In fact, Google itself even highlights this:

rel prev / next may, not least:

  • assist accessibility
  • represent a resource pre-fetching hint to browsers.

So, here I am, one year after the official announcement still using rel prev / next perfectly happily to create a chain of product pages which each show and discuss one of a set of associated products.

To date, I have use rel prev / next to indicate a straight line of product pages from first product page to last product page:

Product 1 Page ==> Product 2 Page ==> Product 3 Page

That's it.

Consequently:

  • Product 1 Page doesn't have a <link rel="prev">; and
  • Product 3 Page doesn't have a <link rel="next">

But would there be anything nonsensical and / or illegitimate about giving Product 3 Page a <link rel="next"> which points to Product 1 Page and vice versa?

e.g. Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1

I'd very much like to implement this, but I want to check first that creating a circular sequence of pages isn't, in principle, an abuse of pagination, somehow.

3
  • I've been away doing another piece of work, but I'm back to this again. Does anyone know of an authoritative source which might confirm (or not) that an endless loop of C => A => B => C => A => B etc. is a legitimate series for rel prev / next links? Mar 27, 2020 at 13:06
  • 1
    I'm not sure that rel prev / next is appropriate to use between product pages at all. There isn't a particular order in which product pages have to be viewed. Prev and next are for things like pagination that have a definite order. May 7, 2020 at 10:17
  • Thanks, @StephenOstermiller - in this case there is a particular order in which the product pages ought to be viewed, though, you're right, it's not obligatory to view them in that order. May 7, 2020 at 10:34

1 Answer 1

3

Three and a half months later I have come back to this with an entirely satisfactory solution.

I was unaware of this when I posted the question above in March 2020, but way back in 2011, the W3C included this section in its then-working-draft of HTML5:

Sequential link types

Some documents form part of a sequence of documents. A sequence of documents is one where each document can have a previous sibling and a next sibling. A document with no previous sibling is the start of its sequence, a document with no next sibling is the end of its sequence.

Source: https://www.w3.org/TR/2011/WD-html5-20110113/links.html#sequential-link-types

It then goes on to reference not only:

  • <link rel="prev">
  • <link rel="next">

but also:

  • <link rel="first">
  • <link rel="last">

This discovery of <link rel="first"> and <link rel="last"> proved to be key.

It means that whereas before I could only think of creating an infinite loop which operates like this:

Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1 ==> Product 2 ==> Product 3 ==> Product 1

in which:

  • Product 3 has a <link rel="next"> pointing to Product 1
  • Product 1 has a <link rel="prev"> pointing to Product 3

I can now, instead, (and much more straightforwardly) use:

Product 1 ==> Product 2 ==> Product 3

in which:

  • Product 1 has no <link rel="prev">
  • Product 3 has no <link rel="next">
  • all product pages have a <link rel="first"> pointing to Product 1
  • all product pages have a <link rel="last"> pointing to Product 3

N.B. In 2020, the contemporary HTML spec (as opposed to the HTML5 2011 Working Draft) makes no reference to <link rel="first"> and <link rel="last"> but the rest of the section on Sequential link types remains largely unchanged.

See: https://html.spec.whatwg.org/multipage/links.html#sequential-link-types

No matter. If there remains an official recognition that documents may form a sequence and that there is utility in a sequential document being able to describe its relationships to certain other documents in that sequence, it seems perfectly reasonable (to me, at this point) that any sequential document ought to have the option to point to the first and last documents in the sequence.

Perhaps, one day, the WHAT-WG will reintroduce <link rel="first"> and <link rel="last"> to the official HTML spec (?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.