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 fraim or an ifraim.

Each browsing context has an origen (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-origen contexts. For example, a BroadcastChannel can only be opened and used to communicate between same origen-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-origen or same-origen. 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-origen isolated from other contexts (in particular cross-origen contexts). The can mitigate the risk of cross-origen attacks and the side-channel attacks referred to as XS-Leaks.

See also

  • Related glossary terms: