Browsing context
A browsing context is an environment in which a browser displays a Document
.
In modern browsers, it usually is a tab, but it can be a window, a popup, a web application, or even a part of a page such as a frame or an iframe.
Each browsing context has an origin (that of the active document) and an ordered history of previously displayed documents.
Communication and resource sharing between browsing contexts is constrained, in particular between cross-origin contexts.
For example, a BroadcastChannel
can only be opened and used to communicate between same origin-contexts.
A browsing context may be part of a browsing context group, which is a set of browsing contexts that share common context like history, cookies, storage mechanisms and so on. The browsing contexts within a group retain references to each other and can therefore inspect each other's global objects and post each other messages.
By default a document opened from a browser context group is opened in the same group whether or not it is cross-origin or same-origin.
The Cross-Origin-Opener-Policy
can be used to control whether the document is instead opened in its own new browsing context group and cross-origin isolated from other contexts (in particular cross-origin contexts).
The can mitigate the risk of cross-origin attacks and the side-channel attacks referred to as XS-Leaks.
See also
- Related glossary terms: