Skip to content

Deprecate script-closeability for session-history length of one? #11229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vinhill opened this issue Apr 16, 2025 · 0 comments
Open

Deprecate script-closeability for session-history length of one? #11229

vinhill opened this issue Apr 16, 2025 · 0 comments

Comments

@vinhill
Copy link
Contributor

vinhill commented Apr 16, 2025

What is the issue with the HTML Standard?

#script-closable currently states

A navigable is script-closable if its active browsing context [...] is a top-level traversable whose session history entries's size is 1.

Before #6315, the spec didn't check for a size of one but for there being only one document in the history. Gecko implemented this as there being only one top-level document in the history. This allowed for same-page or subframe navigations. In this revision, we currently align Gecko to also check for a history length of one.

A session history size of one is more strict and might have even fewer real use-cases on the web. Chromium commit b20d6a6 states this check originally was

for one-off windows that need to open other windows and then dispose of themselves

and might be a deprecation candidate. They introduced a use counter that indicates low usage.

I believe the session history check also creates a situation where a page can be stored in the session store in such a way that the browser closes itself on startup.

Related: #1866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants