Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk3 min

Nuxt 4.5 SSR Streaming: When Route Rules Turn It Off

Nuxt 4.5 SSR streaming is experimental and off by default. Set streaming: false in routeRules for a static route opt-out, or use render:route when the choice depends on request state.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Nuxt 4.5, SSR streaming is experimental and off by default. After enabling it with experimental: { ssrStreaming: true }, you can opt a route or route pattern out with streaming: false in routeRules. Use this when a route must finish rendering before Nuxt sends its response, or when rendering-time code needs to set headers, cookies, or status reliably.

Disable streaming for a route or route pattern

Set streaming: false on the relevant route rule. The following example enables streaming globally, then uses a wildcard rule to keep the matching routes buffered:

As an Amazon Associate I earn from qualifying purchases.

export default defineNuxtConfig({
  experimental: { ssrStreaming: true },
  routeRules: {
    '/no-stream/**': { streaming: false },
  },
})

For a narrower path, replace /no-stream/** with the route you want to exclude. Nuxt documents this as the static, route-level opt-out. See the Nuxt 4.5 announcement and the Nuxt experimental-features guide.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose between a route rule and a per-request decision

A route rule is the simplest choice when the URL alone determines whether the route should stream. If the decision depends on request state—for example, authentication, a cookie, or an A/B test bucket—Nuxt also documents a runtime control through the render:route hook.

Control Scope Decision input Where to configure it
streaming: false A route or route pattern Configured URL pattern routeRules
ctx.prefersStream = false An individual request Request-specific state or logic render:route hook

The hook runs before rendering each request. Check ctx.canStream and set ctx.prefersStream = false when the request should use buffered rendering. Nuxt’s guide also gives conditional 404 handling as an example. Consult the hook documentation for the current context and hook details.

Know when Nuxt already bypasses streaming

Setting a route rule is not the only reason a request may avoid streamed output. Nuxt’s guide lists these cases, which may use buffered rendering or short-circuit into a redirect or error instead:

  • A route rule sets noScripts, cache, isr, swr, redirect, or streaming: false.
  • The route uses ssr: false.
  • The request comes from a bot or crawler. Nuxt excludes these by default so they receive fully rendered HTML; the matching pattern can be customized with experimental.ssrStreaming.botRegex. The documented default targets indexing crawlers and intentionally excludes Lighthouse and other audit tools.
  • The route has been prerendered.
  • Server-side navigateTo() redirects during a plugin, middleware, or page setup.
  • A fatal error occurs before the HTML shell is flushed.

For the meanings and configuration of route rules, see Nuxt’s rendering modes guide and configuration reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why response headers and cookies can be lost

Streaming sends the HTML shell—including the head, styles, preload hints, and entry scripts—before progressively sending the rendered body. The first flush commits the response status and headers. Changes attempted during component rendering after that point cannot be sent to the client; Nuxt describes this as inherent to streaming, rather than a Nuxt-specific bug.

That timing matters for rendering-time calls such as setResponseStatus(), useResponseHeader(), cookie writes through useCookie(), and h3 header operations. If the change must reach the client, move it into a Nuxt or Nitro plugin that runs before rendering, where possible, or disable streaming for the route. In development, Nuxt logs a warning identifying dropped mutations and the route.

Module authors: distinguish pre-flush and body hooks

The render:html hook runs before the shell flush. Changes to htmlAttrs, head, bodyAttrs, and bodyPrepend can reach the response. Changes to body or bodyAppend are dropped because the body is about to stream.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check CSS and other rendering caveats

Nuxt’s guide says route styles arrive after the shell. Styles for the page, layout, and directly nested async components can be available before body paint; styles from an async component nested inside another async component may arrive with the closing HTML, after that component’s DOM.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For paint-critical styling, Nuxt recommends global CSS, utility CSS in the entry stylesheet, or keeping the async component directly under a <Suspense> boundary. If that does not suit the route, opt it out of streaming.

In production builds, Nuxt extracts styles to CSS files or inlines them. Island slot content and selective-client components use inert templates and an inline relocation script; apps using features.noScripts with island components fall back to buffered rendering.

Validate the production response before rollout

Development behavior is not a substitute for checking a production build, particularly for CSS timing. Nuxt recommends running nuxt build && nuxt preview and validating the visuals. Also check the response behavior on routes where headers, status codes, or cookies depend on rendering-time logic, and confirm that your selected static or request-specific opt-out produces the intended buffered response.

The Nuxt 4.5 announcement describes potential TTFB improvement qualitatively, but the cited official sources publish no numerical benchmark or performance statistic. Treat performance as something to measure in your own application rather than assuming a particular gain.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.