HTML Stream
This feature can be used to make pages that load a large amount or make a api calls that can take time to load a bit friendlier to the users.
Note
In version 1.259.14 there is a limitation due to gzip encoding, that will not properly load the features of the stream.
To make the feature work the page name needs to be appended with a “.l” or “.load” suffix, this will disable the gzip encoder on the server for the request.
“my-data-page” -> “my-data-page.load”
This limitation will be removed in the future.
Load break
To activate the stream feature we only need to add the custom node. Server will stream everything until this point, and the rest when it has completed all the api requests and processes. Note that the node itself will not be printed.
Note
Webkit (safari and chrome in ios) has a different first paint rule scheme, it will not make the first paint if the rendered content is not within a certain threshold (~500b), hidden nodes, css or js does not count towards this check.
This mean that if it does not load there then the first visible bytes need to be increased
Examples
Regular html
In this example the loaded data will remain. Something would need to be implemented to hide it once loaded (js or css)
Shadow dom
In here is an example where we use shadow dom to make the data replacement to the slot. This will not need any help from js.