Search code examples
htmlcssgoogle-chromehttpcross-browser

What types of web resources can modern web browsers download in parallel? Also, what can't be downloaded in parallel?


What types of web resources can modern web browsers download in parallel? Also, what can't be downloaded in parallel?

Most answers on StackOverflow address "how many resources can be downloaded in parallel", but not "what". (Example here)

Examples of things that cannot be downloaded in parallel:

  1. CSS files specified by "@import" (Explanation)
  2. <script> without "async" or "defer"
  3. The HTML file itself (e.g., we can't pre-parse <body> while parsing <head>)
  4. What else?

Thanks!


Solution

  • A few more examples of resources that cannot be downloaded in parallel:

    • Background images defined defined within a CSS file aren't discovered until the browser downloads and parses the CSS file

    • Fonts defined with @font-face rules defined within a CSS files aren't discovered until the browser downloads and parses the CSS file

    • fetch() functions defined within a JavaScript file aren't discovered until the browser downloads and parses the JavaScript file