What is prerendering? Pre-rendering a JavaScript heavy website refers to the process of using a proxy that loads the requested page and runs all JavaScript on the page, and then returning the content of the rendered page as the response to the page's request. The advantages of doing so are twofold:
Perfomance of the site is greatly improved as the browser is able to render the page without waiting for external scripts to load and external data api requests to finish. In Brickwork client site that means requesting a store page returns HTML that is already rendered with all the data about the store.
After the initial page HTML is rendered from the response, the browser asycronously request JavaScript scripts that load in the background, query the API for data and re-render the page in browser, adding interactivity to the page. Ideally the page pre-rendered on the server/proxy and the page rendered in the user's browser will be exactly the same (given the api data hasn't chang