never_slow_mode
never_slow_mode copied to clipboard
Use of document.write() for streaming HTML parse
As shown in Jake Archibald’s Fun hacks for faster content, document.write()
may bizarrely have a place in fast in-page loading:
By streaming the content via the iframe, content appears 1.5 seconds sooner. The avatars also finish loading half a second sooner - streaming means the browser finds out about them earlier, so it can download them in parallel with the content.
This technique is a really good way to make navigation transitions with traditional server-side rendering, so I’d hate to see it disallowed entirely.