Skip to content

referer / referrer during reloads & history entry repopulations #6813

@jakearchibald

Description

@jakearchibald

History entry repopulations: When you traverse to a history entry that doesn't have a document, so it needs refetching.

I've been testing using https://redirect-session-history.glitch.me, and it seems like, when reloading a page or traversing back to a page, browsers will send the same referer that was originally used for the first fetch of the page.

That includes cases like:

  1. Page //origin-1/a
  2. Navigate to page //origin-1/b (so referrer is //origin-1/a)
  3. Reload, which redirects to //origin-1/c

//origin-1/c will have a referrer of //origin-1/a.

One minor browser difference:

  1. Page //origin-1/a
  2. Navigate to page //origin-1/b (so referrer is //origin-1/a)
  3. Reload, which redirects to //totally-different-origin/foo, which redirects back to //origin-1/c

In this case Chrome and Firefox simplify the referrer to //origin-1/ (with the full origin of course), whereas Safari uses the full referrer //origin-1/a.

My plan is to spec the Chrome & Firefox behaviour by storing the referrer along with the "document state". The document state is the state needed to recreate a document, and is shared between multiple session history entries (entries that will share a document).

Metadata

Metadata

Assignees

No one assigned

    Labels

    interopImplementations are not interoperable with each othertopic: history

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions