Home > Web Design | Web Development > Loading CSS without blocking render

Loading CSS without blocking render

Typically you do want CSS to block rendering. Pages would load in a very awkward manner if you saw the page load with no CSS first, then shift around as the CSS is parsed and applied to the page.

But there are some situations where you want to defer loading of CSS – for instance a stylesheet of custom fonts you don’t mind downloading late. Or even your main stylesheet if you’re doing critical CSS.

Keith Clark presents a really simple way to do this in this article (no dependencies). Scott Jehl chimed in saying onload has spotty support though. His little async CSS loader is likely the best way to go for the best possible browser support.

Direct Link to ArticlePermalink


Loading CSS without blocking render is a post from CSS-Tricks

TOP
Visit Us On TwitterVisit Us On FacebookVisit Us On Google PlusVisit Us On Linkedin