(no title)
miragecraft | 6 months ago
Yes it’s slower, but does it matter for your specific use case? Async scripts are harder to reason about, esp if you have nested templates. FOUC is also a much bigger and more noticeable problem than the tiny delay to parse the CSS snippets.
Forcing scripts to be parser-blocking is also needed if you want to nest document.write, to ensure it is writing to the correct location in the document.
I created an HTML includes library that utilizes document.write extensively: https://miragecraft.com/projects/x-include
No comments yet.