Examples

What a reader sees, and when.

The remember extension running on this site, with the configuration behind it and the behaviour to expect on each format.

This site runs the extension on itself.

TipTry it

Scroll to the bottom of this page, follow a link to another page, then come back: you should land where you were rather than at the top. To see the prompt instead, close the tab after scrolling and open the page again. A tab that has already moved around the site restores the position without asking; a new one asks, and says how long ago the visit was.

The configuration behind this site

filters:
  - remember

extensions:
  remember:
    page-exclude:
      - /changelog.html

Every page here is tracked apart from the changelog, which is excluded to show page-exclude working: scroll it, leave, come back, and nothing is offered.

What is remembered where

This site’s behaviour, page by page.
On this site Behaviour
Any page but the changelog Scroll position and section restored, on request when the visit is new.
The changelog Nothing stored, nothing offered.

Excluding pages

Each entry is matched against the browser’s pathname, as a literal substring or as a glob where * covers one path segment:

extensions:
  remember:
    page-exclude:
      - /search.html      # this exact page
      - /drafts/*         # every page one level under /drafts/
      - /appendix         # any path containing this text

Books

In a book the extension remembers the chapter as well as the position in it, and a return visit offers that chapter rather than a scroll.

extensions:
  remember:
    separate-chapter-state: true

With that on, the chapter is stored separately from the scroll position, so a reader who opened a chapter without scrolling is still offered it on their return.

Presentations

In a RevealJS deck the slide indices are stored instead: horizontal, vertical, and fragment. Returning to the deck offers the slide that was on screen, fragment included.

When nothing happens

The prompt is deliberately reticent, and these are the usual reasons it stays away:

Why a prompt may not appear.
Reason Detail
Nothing worth restoring Under 100 pixels of scroll, no section anchor, and not on a specific slide.
Already moving around the site Within one browser tab the position is restored without a prompt.
Too soon It appears at most once every five seconds.
Already declined Declining clears the stored position rather than deferring it.
Storage refused A browser that will not write to localStorage, such as a private window, disables the feature with one console warning.
Page excluded The pathname matches an entry in page-exclude.

Source

The repository ships a short, standalone starting point you can copy: example.qmd.

Back to top