Devflare Docs
Application example Bindings

Use Browser Rendering in a real application path

Browser Rendering lets Workers drive a headless browser for screenshots, PDFs, and page automation.

This example shows the real browser path people actually need: one binding, one title-read route, and one smoke check through the dev server.

It is intentionally smaller than a full PDF pipeline, but it uses the same Devflare idea: a narrow worker route on top of a bridge-backed local browser lane.

Config focus
Single browser binding
Runtime shape
Launch puppeteer with the Worker binding and close it cleanly
Best use
Small screenshot, title-read, or PDF-generation entrypoints

Start by wiring the binding clearly in config

Minimal browser config

Build the application flow around the binding

Treat this as the app-level Browser Rendering path: the route, event handler, or service module receives a real request and uses the binding to do useful work.

Keep product limits, remote ownership, and fallback behavior visible in the code around the binding instead of hiding everything behind a vague utility too early.

  • Keep the first route tiny so launch, navigation, and cleanup are the only moving parts you have to trust.
  • If the real feature is PDF generation, this same pattern is the foundation for that worker path.

Read one page title with Puppeteer

Keep production boundaries visible

  • Config focus: Single browser binding.
  • Runtime shape: Launch puppeteer with the Worker binding and close it cleanly.
  • Best use: Small screenshot, title-read, or PDF-generation entrypoints.

The Devflare value is the bridge-backed local lane

Browser work is still heavier than most bindings, but Devflare gives it a real local/dev story instead of forcing you to document only the production path. Keep the first route narrow enough that launch failures are easy to diagnose.

Previous

Testing Browser Rendering

Browser tests should usually be integration-flavored: either drive the worker in dev or exercise a thin smoke path that proves the binding can launch and fetch.

Next

Analytics Engine

Analytics Engine is modeled cleanly in Devflare config and generated types, but the repo evidence points to a lighter local story than KV, D1, and R2.