{"canonical_url":"https://engineer.company/glossary/browser/","content_markdown":"# Web browser\n\n## What it is\n\nA web browser is the software that takes an address, fetches whatever the\nserver sends back and turns it into a page someone can read, scroll and click;\nin everyday speech it is just the browser. Chrome, Safari, Firefox and Edge are\nthe names on the icons. Underneath them sit far fewer programs than the names\nsuggest.\n\nThe HTML standard rarely says “browser”. Its word is _user agent_, the software\nacting on the reader's behalf, and most of its length is a list of what a user\nagent must do with a page. Three of those duties explain most of what a browser\nis for.\n\nIt parses. The standard sets out parsing rules for HTML documents “whether they\nare syntactically correct or not”, so a missing closing tag or a misplaced\nelement does not stop the page. Every conforming browser repairs the same\nbroken markup into the same tree of elements, which is why a sloppy page still\nappears and why its mistakes can sit unnoticed for years.\n\nIt runs an event loop. Clicks, key presses, timers, network replies, scripts\nand the drawing of the next frame queue up and take turns. A script that holds\nthe loop for two seconds holds up clicks, typing and the next paint with it,\nwhich is what a person means when they say a page has hung.\n\nIt keeps sites apart. The standard defines an origin as a scheme, a host and a\nport, and a site as a scheme plus the registrable part of the domain. A script\nfrom one origin that reaches into the document of another gets a security\nerror, not the contents. Most of what keeps a bank tab safe from a news tab is\nthis rule, enforced by the browser on every access.\n\nThe part that does this work is the _engine_. Most browsers in use today are\nbuilt on one of three: Blink inside Chrome, Edge and a long tail of others;\nWebKit inside Safari; and Gecko inside Firefox. A new browser name usually\nmeans a new shell around one of these, with its own address bar, settings and\nsync, but the same rules for reading and drawing a page.\n\nTwo neighbours get confused with it. A search engine is a website the browser\nopens when the address bar is given words instead of an address. A _webview_ is\na browser engine embedded inside another app, with the address bar and most of\nthe controls taken away. Test tools add a _headless_ browser, which draws pages\nno one looks at so that a script can check them.\n\n## Why it matters\n\nA server can send exactly the right bytes and the reader can still get an\nunreadable page, because what a person sees is whatever their browser made of\nthose bytes, with their own settings applied on top. The browser is where the\nwork is judged.\n\n**Testing follows engines, not brands.** A test plan with four browser names\non it may be covering two engines twice and missing the third. The useful list\nnames the engines and the platforms where the same engine behaves differently,\nsuch as a phone with a small screen and touch input, or a print dialog.\n\n**The reader's settings are part of the page.** A browser carries a preferred\ncolour scheme, a request for reduced motion, a zoom level, a default text size\nand sometimes a translation layer. A page that ignores all of that is designed\nfor one configuration of one person, usually whoever built it.\n\n**Features are asked for, not assumed.** Engines ship new CSS and new\ninterfaces at different times. A page that needs something only some engines\ndo can ask the engine directly: CSS has `@supports`, and a script can test for\na property before it uses it. The user-agent string is a poor substitute,\nbecause browsers have long written it partly to look like each other so that\nolder sniffing code would let them in.\n\n**Rules in the browser are courtesies.** Form validation, a disabled control or\na hidden link all run inside a program that the reader owns and can change.\nThey make the honest path easier and stop no one who opens the developer tools\nor skips the page entirely, so anything that protects money, data or access is\nchecked again on the server.\n\n## What it looks like in practice\n\nThis site underlines its links with skip-ink, the setting that breaks the line\nwhere it would cross a descender. In Chromium the breaks looked right. Measured\nin a real Safari at eight times scale, the breaks were about six times narrower,\nand the cause turned out to be a WebKit defect in which a single font face\ndeclaring a non-Latin character range degraded skip-ink for the whole family.\nThe fix was a renamed family in the font stack. The account of\n[the Safari underline and the font subset that caused it](/notes/safari-underline-font-subset/)\nends on the lesson this article would put first: a skip-ink measurement is only\ntrue of the engine that produced it. The table, the diagnosis and the first fix\nwere all Chromium, and the screenshot that reopened the case came from a person\nlooking at the page.\n\nPrinting is a second place where engines part ways. The\n[637-line print stylesheet](/portfolio/built-a-637-line-print-stylesheet/)\ndocuments four engine behaviours as traps, each tied to a real defect. One\nengine sizes viewport units against the printed page box and another against\nthe browser window, so a page printed from a wide window lost a third of every\nline in the second. Fixed-position elements paint on every sheet. Labels\ncoloured for the dark default theme printed white on white for readers whose\nbrowser preferred dark. A flex or grid box that paged media cannot split\nproduced a blank first sheet. The check that guards it runs six paper and\norientation combinations under both colour-scheme preferences and counts the\nreal pages, and one engine still ignores widow and orphan control.\n\nThe third case was found by readers rather than by a test. When the site went\nout as\n[a Tor onion mirror on a readable address](/portfolio/published-a-readable-tor-onion-mirror/),\nits first readers were on a different browser engine, one that does not\nimplement the scroll-driven animation the footer relied on, and every one of\nthem got the colophon painted across the front page. The defect was real on the\nordinary site as well; it took an audience on another engine to show it.\n\n## Where it goes wrong\n\n- **A page is checked in the browser on the developer's desk and declared\n  done.** Every habit of that one engine becomes a hidden assumption. The\n  remedy is a short matrix with one browser per engine, plus a phone, measured\n  in each before a fix is called done.\n- **Code reads the browser's name and guesses what it can do.** The guess is\n  wrong for every browser that borrows another's label, and it goes stale with\n  each release. Asking for the feature keeps the decision with the engine, and\n  the rule outside the block is what every other engine gets, so it should be\n  the safe state:\n\n```css\n.footer {\n    position: static;\n}\n\n@supports (animation-timeline: scroll()) {\n    .footer {\n        animation: settle linear both;\n        animation-timeline: scroll();\n    }\n}\n```\n\n- **Unstyled elements inherit the browser's own defaults.** Headings, margins\n  and especially form controls arrive with each engine's built-in style sheet,\n  and those differ. A design that looked finished may have been relying on one\n  engine's choices without anyone deciding them.\n- **A rule enforced only in the page is treated as enforced.** A button greyed\n  out by a script, a field limited to numbers, a link hidden from people\n  without a plan: each holds only for readers who leave the page as it was\n  sent. The server repeats every check that matters.\n- **Links open inside someone else's app.** A link tapped in a chat or on\n  social media often lands in an in-app browser or a webview, frequently with\n  storage of its own, so a person signed in to their main browser arrives as a\n  stranger. Flows that hand off to another app or rely on an existing session\n  need testing from those entry points too.\n\n## Further reading\n\n- [NIST CSRC Glossary: web browser](https://csrc.nist.gov/glossary/term/web_browser)\n  — two short definitions taken from NIST publications, one of them the plain\n  “client software used to view Web content”.\n- [HTML Standard: Parsing HTML documents](https://html.spec.whatwg.org/multipage/parsing.html)\n  — the rules every browser follows to turn markup, broken or not, into the\n  same tree.\n- [HTML Standard: Event loops](https://html.spec.whatwg.org/multipage/webappapis.html#event-loops)\n  — how input, scripts, network replies and rendering take turns on one loop.\n- [HTML Standard: Loading web pages](https://html.spec.whatwg.org/multipage/browsers.html)\n  — origins, sites and the rules that stop one page from reading another.\n- [WebKit Bugzilla: bug 255159](https://bugs.webkit.org/show_bug.cgi?id=255159)\n  — the engine's own record of the skip-ink defect described above.\n\n\u003chttps://engineer.company/glossary/browser/\u003e\n","date_modified":"2026-10-20T21:59:50Z","description":"Three engines sit under almost every browser name, and a page checked in one of them has been checked in that one and no other.","formats":{"gemtext":"https://engineer.company/glossary/browser/index.gmi","gopher":"https://engineer.company/glossary/browser/gophermap","html":"https://engineer.company/glossary/browser/","json":"https://engineer.company/glossary/browser/index.json","markdown":"https://engineer.company/glossary/browser/index.md","pdf":"https://engineer.company/glossary/browser/index.pdf"},"kind":"page","language":"en","title":"What is a web browser?","url":"https://engineer.company/glossary/browser/","version":1}