Preserve History State after Cross-Document Navigation

Open
#1,441 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
html, javascript
Domain
frontend, web-dev

Research direction

Review the HTML specification section on navigation and history APIs. Examine the provided test files a.html and b.html to understand the current cross-document navigation behavior. The goal is to align browser implementations (Blink, WebKit) with Gecko's behavior of preserving history state. Check existing web-platform-tests for navigation to see how tests are structured.

Written by the indexing model from the issue text.

Description

focus-area-proposal
Description

Currently, Blink and WebKit discard the developer-supplied history entry state after a cross-document navigation, but retain the state during a same-document navigation.

This behavior is inconsistent and makes passing data to a navigation target highly complex.

The current behavior of Gecko is more consistent, as the state is always preserved after any navigation.

The ability to seamlessly pass state across documents is critical for web apps that aren't strictly single-page. Resolving this cross-browser discrepancy will significantly lower friction for modern web state handling and allow developers to drop hacky storage-based fallbacks.

Specification

https://html.spec.whatwg.org/multipage/nav-history-apis.html

web-feature

web-features: navigation

Test Links

a.html
b.html

Additional Signals

No response

Dominant language
JavaScript
Stars
591
Forks
39
Avg merge
3h 8m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-platform-tests/interop

All issues in web-platform-tests/interop

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.