In many websites, there are static portions of the page such as the navigation or header that rarely change. If we could deliver the markup for navigation, the experience would feel a bit snappier while the rest of the page is generated.
Try running this snippet in node and visit localhost:3000/incremental
and localhost:3000/blocking
.
These are pretty trivial examples but we could cache and immediately send the nagivation bar and <head>
elements for every request.