HTML Concepts: Browsing Contexts
Published on Sep聽30, 2022 (updated Oct聽18, 2024), filed under development, html. (Share this post, e.g., on Mastodon.)
Welcome to another episode of HTML Concepts! Today, browsing contexts鈥攚hat is that?
The starting point should be the HTML specification (as always鈥攖his, and not even MDN, is the source of truth). What does it say?
A browsing context is an environment in which
Documentobjects are presented to the user.
This is cryptic, but the specification goes on to clarify:
A tab or window in a web browser typically contains a browsing context, as does an
iframeorframes in a frameset.
This sounds fundamental and indeed, the browsing context is a key concept:
A browsing context is where a user agent displays a document鈥攚hich often is a tab or window, but can also be an iframe or frame. Every browsing context has its own DOM, origin, navigation and history, as well as cookies.
That is, every site or app has a and its own browsing context鈥攁nd that鈥檚 why this is such an important, yet also basic concept.
I鈥檓 not sure I made a much more complex subject overly simple, or a simple subject overly complex! Please let me know.
About Me
I鈥檓 Jens (long: Jens Oliver Meiert), and I鈥檓 an engineering lead, guerrilla philosopher, and indie publisher. I鈥檝e worked as a technical lead and engineering manager at various companies (e.g., Google); I鈥檓 an active web and tool developer (code optimization, digital defense), a contributor to web standards (like HTML, CSS, WCAG), and a book author (O鈥橰eilly, Frontend Dogma).
I love trying things鈥攊n web development and engineering management, but also in politics and philosophy, where I hold to one idea in particular: that we can only be well if we take good care of everyone. Here on meiert.com I talk about some of my perspectives and experiences. (Interpret charitably but be critical鈥攁nd share feedback and advice that makes my work better.)
