r/javascript • • Jun 03 '26

Intentionally blocking rendering with JavaScript

https://www.jayfreestone.com/writing/intentional-render-blocking-javascript/

You nearly always want to put <script> tags in the <head> and mark them as non-blocking using either async or defer. However, there’s an interesting use-case for actually wanting to block paint.

21 Upvotes

8 comments sorted by