Flashbang intercepts the request at the Service Worker level before the browser renders anything. The SW does a hashmap lookup and a string template fill on raw URL-encoded bytes. Median redirect latency is sub-1ms. The browser never loads a page.
How it works:
- Service Worker intercepts every search request before it becomes a navigation and before page starts loading
- Bang parsing operates on raw encoded strings — no decodeURIComponent, no regex, no new URL() in the hot path
- Supports all 7 DuckDuckGo bang syntax patterns (prefix, suffix, no-space, mid-query, etc.)
- 14,000+ bangs from DDG + Kagi, plus custom bangs
- Address bar autocomplete via OpenSearch with a radix trie, ranked by frecency (exponential decay, 14-day half-life)
- Once the SW is installed, redirects work fully offline
What it's not:
- Not a browser extension — it's a web app you set as your default search engine
- No tracking, no analytics, no telemetry
- Zero runtime dependencies
- AGPL-3.0
~2,600 lines of TypeScript, 1,200 lines of tests. I'd love feedback on the architecture.
t3ntxcles•1h ago