Are resources with preload link loaded before resources that are higher up in the code?

20 Views Asked by At

In the following example there is a style sheet link and after that a preload link. I wonder which one gets prioritized by browsers. Is the logo.jpg download started before before the main.css download although the link is below?

<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Demo-Website</title>
<link rel='stylesheet' href='main.css' media='all' />
<link rel="preload" as="image" href="logo.jpg" />
</head>
<body>
<img alt="logo" src="logo.jpg" />
</body>
</html>

The reason for my question is that the WordPress page speed optimization tool, Hummingbird, allows for resources to be preloaded. Accordingly, a preload link is generated in the header, but it is positioned after many other resources in the header. This makes me wonder if this setting has any effect at all.

0

There are 0 best solutions below