Browser context is the security environment in which a web page runs inside a browser. It includes the page’s scripts, cookies, session tokens, local storage, and the rules that control what the page can read or do. In practice, it is the “identity and state” a browser gives to a site while a user is logged in.
This matters because many attacks target the browser context instead of the server. If an attacker can inject script through cross-site scripting, hijack a session, or trick a user into approving a request, they can act with the victim’s browser state. Defenders protect this context with same-origin policy, content security policy, HttpOnly and Secure cookies, anti-CSRF tokens, and careful input handling. Any web-facing admin tool or file browser should be treated as sensitive because its browser context can expose data or privileged actions.


