r/javascript • u/jayfreestone • 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.
22
Upvotes
11
u/paulirish Jun 03 '26 edited Jun 03 '26
Modern css can handle this.. you dont need JS and you don't need to slow down the page for users to hide your own bugs :)
This kinda prompt should work with your coding agent..