79123893

Date: 2024-10-24 23:57:36
Score: 0.5
Natty:
Report link

So if I have page with 10 CSS files, is that going to result in 10 requests? If so, is that ok?

It will result in 10 requests. This should be okay.

I would hope that the browser would read all the links in the HTML head and request them at the same time.

Fortunately, the browser does this.

On HTTP/1.1 the browser can do up to 6 requests at the same time. On HTTP/2 there isn't really a limit.

So including multiple small CSS files is about the same efficiency as one big CSS file with the same content.

Here's a screenshot of developer tools where I added some stylesheets with <link href="..."> tags that take an artificially long time to return an HTTP response:

Screenshot of developer network tools timing graph showing multiple requests being made at the same time.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Cadence