LoadCSS Project

LoadCSS: Low-Priority Asynchronous CSS Loading Demo

This test page demonstrates a new pattern for loading a stylesheet asynchronously at a low priority. The page will turn green when the CSS loads.


<link rel="alternate stylesheet" href="slow.css" title="styles" as="style" onload="this.title='';this.rel='stylesheet'">

Instead of the usual print toggle, this page is loading CSS with rel="alternate stylesheet", which will load async at a low priority. Onload, the rel is set to stylesheet and title is turned off, causing it to apply. What's nice about this pattern is you can add another rel value of "preload" to increase its priority from low to high. View high priority async demo