Menu

Nuxt SSR Streaming: Faster TTFB and the Response You Can't Change Later
📰

Nuxt SSR Streaming: Faster TTFB and the Response You Can't Change Later

DEV Community: vue·Danny Holloran·about 16 hours ago
#rlK9c7Qj
#devtovue#devto#dev#nuxt#streaming
Reading 0:00
15s threshold

Classic server rendering in Nuxt is all or nothing. The server runs every plugin, resolves every awaited useFetch , renders the whole Vue tree to a string, and only then sends a single byte back. If one API call on the page takes 600ms, the browser sits staring at a blank tab for 600ms, unable to even start downloading your CSS. Streaming SSR has been one of the longest-standing open issues in the Nuxt repo, and as of Nuxt 4.5 it finally ships behind a flag.

The win is real, but it comes with a contract change that is easy to trip over. Once the first byte is on the wire, the HTTP status and headers are locked in. Let's look at both halves.

Turning it on

Streaming is experimental and off by default.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.