Instead of rendering each pagelet server-side with Play's templating, you can send back JSON and render each pagelet with a client-side templating library such as mustache.js
Instead of rendering each pagelet server-side with Play's templating, you can send back JSON and render each pagelet with a client-side templating library such as mustache.js
Shows an example of how to handle an error that occurs part way through streaming a response to the browser.
Shows an example of how to handle an error that occurs part way through streaming a response to the browser. Since you've already sent back the headers with a 200 OK, it's too late to send back a 500 error page, so instead, you have to inject JavaScript into the stream that will show an appropriate error page.
Renders the exact same page as WithBigPipe#index, but this time with server-side rendering.
Renders the exact same page as WithBigPipe#index, but this time with server-side rendering. This will render all pagelets server-side and send them down in-order. The page load time will be longer than with out-of-order client-side rendering (albeit still faster than not using BigPipe at all), but the advantage is that server-side rendering does not depend on JavaScript, which is important for certain use cases (e.g. older browsers, search engine crawlers, SEO).
A few more BigPipe examples