The Simplest Way to Load CSS Asynchronously

For a very long time Filament Group (and in particular Scott Jehl) has been coming up with ways to ensure that we have tools to ensure that our websites appear as quickly as possible for our users. A long-time approach was preloading CSS, and they’ve come up with a new approach for you to check out.

There are several ways to make CSS load asynchronously, but none are as intuitive as you might expect. Unlike script elements, there is no async or defer attribute to simply apply to a link element, so for years now we’ve maintained the loadCSS project to make the process of loading async CSS a little easier. Recently though, browsers have standardized their CSS loading behavior, so a dedicated script like loadCSS to handle their minor differences is likely no longer necessary.

An excerpt from The Simplest Way to Load CSS Asynchronously

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.