Why is my waterfall out of order?

The javascript located at the bottom of the page is being requested before resources found before. And the images are taking a long time to return from the server.


Browsers may choose to download resources in the order they think is optimal rather the order they appear in the page.

Chrome is the most aggressive at this - it’s common for it to promote synchronous scripts at the bottom of a page to a higher priority.

Adding the defer attribute will demote the scripts priority so the images might load sooner but test, measure and check would be my advice, as delaying the scripts might increase Time-to-Interactive (TTI)

As far as the images go the server overall seems a bit slow - there seems a lot of time when the network looks idle, might be worth upgrading nginx as a first step and there have been a bunch on HTTP/2 fixes added and the version you’re running it two years old

Also worth reading some of the posts that Pat wrote while he was at Cloudflare on HTTP/2 prioritisation, server configs, and nginx