Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:1broseidon Ketch Fast Path First Scrape

From Leeroopedia
Knowledge Sources
Domains Scrape, Performance
Last Updated 2026-10-27 00:00 GMT

Overview

A scrape strategy that always tries the cheap plain-HTTP fetch first and escalates to headless-browser rendering only when the response is detected as a JavaScript shell, so a page that serves real HTML never pays the browser cost.

Theoretical Basis

Headless-browser rendering is orders of magnitude slower and more resource-intensive than an HTTP GET, but some pages are unusable without it (client-rendered SPAs). Escalating on detection rather than on a per-site allowlist keeps the fast path the default: a plain HTTP fetch returns immediately for the majority of pages, and only a page classified as a `"likely_shell"` triggers the browser re-fetch.

The `source` tag (`http`, `http_shell`, `browser`) records which path produced a cached page, so the cache can invalidate a stale shell entry once a browser is configured — without churning entries for plain pages that never needed rendering. A shell cached before the browser was configured is bypassed on the next request and retried with rendering.

Usage

Use when a fetch path has a cheap default and an expensive fallback, and the fallback is only needed for a detectable subset of inputs. The detection must be cheap (it runs on the fast path) and conservative (a false positive costs an unnecessary browser render; a false negative returns garbage).

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment