Give Devs the ability to opt-out of the sandbox for SSR page hydration.
Give Devs the ability to opt-out of the sandbox for SSR page hydration.
Many server-side rendered (SSR) pages are marketing pages. These pages are data-driven, and that data only needs to be fetched once for the user.
Today data fetching in a fastboot application happens in three stages places.
- The Server
- Clientside first load
- All further rending of the page
For #2, we use the fastboot shoebox to serialize the data into the HTML, then as the ember app boots and hits an API request, the data is retrieved from the shoebox and used to hydrate that section of the page. This process works very well, eliminating the client from making a data request for more data.
First Contentful Paint (FCP) is based in part of parsing the HTML document. The shoebox data can be a third of the content of the initial HTML page. The shoebox can make the page size heavy.
Giving the developer the ability to opt-out of needing data from the shoebox would make pages load faster. Since we have the rendered content from fastboot, we could skip hydration of the HTML hookup DOM events and move on.