Low-level fetching code.

Fetching/loading code is divided into:

  • core/fetch: Fetch API
  • core/loader: high-level fetching
  • platform/loader/fetch: low-level fetching

Request Prioritization

The request priority used for any given fetch is a browser-specific internal attribute that is generated by considering the destination of the resource, any explicit priority hints as well as browser-specific heuristics. In Chrome's case, it includes:

  • Position in the document so that late-body scripts are not given as high of a priority as early render-blocking scripts.
  • If a fetch is generated by a preload or if it is for the underlying resource directly.

There is a web.dev article describing the priority scheme used by Chrome here.

Determining request priority is spread across 3 different locations in Chrome: