Re:Portals API
by maxfurman on Tuesday June 30, 2020 @10:34AM
(#23690422)
It may or may not be faster in real terms, but it _feels_ faster to users, because the browser window never blanks out between screens.
[ Parent
| on HN ]
If you replace the entire body wouldn't there be a blanking that occurs regardless? Or does the browser not repaint the parts of the page that look the same in the before and after?
A regular page load will block and show a blank screen until all of the style tags, script tags, etc. have been fetched. Replacing the body does take a few ms to paint, but does not need to wait on any other fetches.
Of course there are techniques to improve page load time without turbolinks (using async script tags for example), but turbolinks predates many of those.