Skip to content

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

@vinhill

Description

@vinhill

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions