August 26, 2017 03:39 pm GMT
Original Link: https://www.viget.com/articles/managing-css-js-http-2
Managing CSS & JS in an HTTP/2 World
Trevor Davis on how we'll link up CSS when we go all-in on HTTP/2:
This is the opposite of what we have done as best practice for years now. But in order to take advantage of multiplexing, it's best to break up your CSS into smaller files so that only the necessary CSS is loaded on each page. An example page markup would look something like this:
<link href="stylesheets/modules/text-block/index.css" rel="stylesheet">
<div class="text-block">
...
</div>
<link href="stylesheets/modules/two-column-block/index.css" rel="stylesheet">
<div class="two-column-block">
...
…
Managing CSS & JS in an HTTP/2 World is a post from CSS-Tricks
Original Link: https://www.viget.com/articles/managing-css-js-http-2
Share this article:
Tweet
View Full Article