Skip to content

Buffer streamed HTML responses in the service worker#3385

Draft
adamziel wants to merge 7 commits into
trunkfrom
adamziel/buffer-html-responses
Draft

Buffer streamed HTML responses in the service worker#3385
adamziel wants to merge 7 commits into
trunkfrom
adamziel/buffer-html-responses

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented Mar 13, 2026

What it does

Buffers text/html response bodies in the service worker before returning them to the browser. Non-HTML responses (JSON, images, file downloads) continue streaming normally.

Rationale

When streaming HTML, Chrome view transitions are animating to the partially streamed state. This makes the UI elements appear one by one in a fast progression and feels weird. Most servers buffer the HTML responses, let's just do the same in Playground. Perhaps, in a follow-up, we could figure how to buffer every PHP response by defaul unless flush() is called.

Before merging, let's confirm this solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant