2 ms·
I don't want to necessarily argue with OP's CSS file but there is a teachable moment here. We make a master CSS file because we don't want to serve bunches of C
by hinkley 5y ago
I don't want to necessarily argue with OP's CSS file but there is a teachable moment here. We make a master CSS file because we don't want to serve bunches of CSS files per page. The constraint we want is:
n << 100
There are other solutions besides n=1 that satisfy this inequality. Serving 2 CSS files per page does not introduce substantial latency over 1, even on HTTP 1.1 user agents. Once you get to 4 you start to cause some problems, but 2 is barely noticeable.
CI/CD can fight your CDN by reissuing every asset on your website on every single publish, causing all of your visitors to soak up bandwidth at the same time. If you name your JS and CSS bundles based on the hash of the contents instead of prefixed with a version number, then many publishes will reuse the same assets, except that doesn't scale so the bigger the website the more evictions you'll see. But a site bundle with a per-page or per-subject matter bundle does scale, because targeted fixes often won't affect your home page.