nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

SSR Streaming / improve Time to First Byte

Open Timkor opened this issue 5 years ago • 4 comments

What problem does this feature solve?

Although there are some caveats using streaming in SSR.

It's still possible to stream some important tags in the <head> section, such as:

  • <link rel="dns-prefetch"> tags
  • <link rel="preconnect"> tags
  • <link rel="prefetch"> tags
  • <link rel="preload"> tags

Maybe even more, such as default layout and theme styles.

This will improve page loading time since the browser has more time to preconnect, preload and prefetch connections and resources.

What does the proposed changes look like?

  • Change the order of the HTML template so that tags which are not dependent of any dynamic components are in front.
  • Change the vue-renderer package in a way that it sends part of the HTML as soon as possible.
This feature request is available on Nuxt community (#c8460)

Timkor avatar Jan 13 '19 09:01 Timkor