Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 39 min read Case study mediumAdept

How we think about browsers

GitHub is moving its shipped JavaScript to ECMAScript 2020 syntax, including optional chaining and nullish coalescing, which cuts about 10kb of JavaScript site-wide. Progressive enhancement keeps basic functionality working for very old browsers that can't run the new syntax. User-Agent analytics from May 2022 show about 95% of requests come from seven browsers, led by Chrome at over 70%. Over 70% of traffic is on the latest browser release and under 1% is three or more versions behind, and week-over-week Safari data shows how quickly new versions get adopted. These numbers drive which browsers GitHub tests on, how its static analysis is configured, and which syntax features and polyfills it ships, with support from a newly open-sourced browser support library.

Assumes: JavaScript transpilation and polyfillsprogressive enhancement

Related posts

  • Bun v1.3.12

    Bun mediumAdept

    Bun v1.3.12 adds Bun.WebView, a built-in headless browser automation API with WebKit and Chrome (CDP) backends. It dispatches OS-level trusted input events and waits for elements to be actionable, Playwright-style. Other additions are terminal Markdown rendering via `bun ./file.md` and Bun.markdown.ansi(), an in-process Bun.cron() scheduler that never overlaps runs and fires in UTC, and async stack traces for native APIs. The release also fixes UDP ICMP error handling and truncation detection, aligns unix socket lifecycle with Node.js, and embeds standalone Linux executables in an ELF section so execute-only binaries work. A JavaScriptCore upgrade brings `using` declarations and JIT improvements, and benchmarks show URLPattern up to 2.3x faster, SIMD-accelerated stripANSI/stringWidth up to ~11x faster, and faster bun build on low-core machines.

  • Version 100 in Chrome and Firefox

    Mozilla Hacks mediumAdept

    Chrome (March 29, 2022) and Firefox (May 3, 2022) are reaching major version 100, and the move to a three-digit version in the User-Agent string could break sites whose UA parsing assumes two digits. Both browsers ran field experiments reporting version 100 to find breakage. Firefox can hot-fix individual sites via its about:compat interventions or freeze the major version at 99. Chrome's fallback freezes the major version at 99 and moves the real version into the minor field (e.g. 99.101.4988.0). Developers should test with the version-100 flags, add tests for versions of 100 and above to UA parsers, upgrade old parsing libraries and report issues to webcompat.com.

  • Bun v1.3.9

    Bun mediumAdept

    Bun v1.3.9 adds `bun run --parallel` and `--sequential` for running package.json scripts with prefixed output across workspaces, along with Node-compatible HTTP/2 connection upgrades via `net.Server`, `Symbol.dispose` support for test mocks, `NO_PROXY` handling for explicit proxies, `--cpu-prof-interval`, and ESM bytecode in `--compile`. A JavaScriptCore upgrade brings SIMD-accelerated RegExp prefix search on ARM64 and x86_64, JIT compilation of fixed-count parenthesized subpatterns (~3.9x faster), DFG/FTL intrinsics for `startsWith`, `Set/Map#size` (2.2-2.7x) and `trim`, and rope-returning `String#replace`. Fixes include SIGILL crashes on ARMv8.0 CPUs caused by mimalloc LSE atomics, a chunked-encoding request smuggling bug, and keep-alive hangs for proxy-style requests.

  • Bun v1.3.7

    Bun mediumAdept

    Bun v1.3.7 upgrades JavaScriptCore, which brings faster async/await (35%), Array.from, padStart/padEnd, array.flat and better ARM64 codegen using ccmp/ccmn chains. It also speeds up Buffer.from() with arrays by up to 50% and Buffer.swap16/swap64 by 1.8x and 3.6x through CPU intrinsics. New APIs include Bun.wrapAnsi (33–88x faster than the wrap-ansi npm package), native JSON5 parsing and imports, and Bun.JSONL with streaming parseChunk. For diagnostics there is Markdown CPU and heap profile output, --heap-prof heap snapshots and the node:inspector Profiler API. Compatibility fixes cover header case preservation in fetch, S3 presign options, bun pm pack lifecycle scripts, Indic grapheme clustering and Next.js 16 timer internals.

  • Optimizing WebKit & Safari for Speedometer 3.0

    WebKit hardMaster

    WebKit's Speedometer 3.0 work spans JavaScriptCore, DOM, style, layout, rendering and Safari itself, with measured gains for each change. The largest wins came from letting the simple text path handle font-variant-caps (4.5x on Editor-TipTap, ~7% overall) and from scheduling incremental sweeping and garbage collection opportunistically between rendering updates (6.5% on Speedometer 3.0). Other changes include reworked megamorphic and call inline caches, retuned inlining heuristics, lazy JIT code destruction, enum-based RenderObject type checks, cached CSS custom property resolution, and a larger IOSurface cache (hit rate ~30% to ~80%). Profile-guided optimization interacts with code changes in a surprising way: some improvements only appear, or briefly regress, until the PGO profiles refresh.

The quest for software engineering knowledge.

Look:
Layout: