DNS Prefetching + Preconnect of assets_host (CDN Domain)
What does this MR do?
This adds as a <link rel="dns-prefetch" href="//assets.gitlab.com">
dns-prefetch hint the setup asset_host so the browser will try to prefetch already the DNS for the CDN domain. It also adds a preconnect hint so that the connection to the CDN is made as fast as possible <link href="//assets.gitlab.com" rel="preconnect" crossorigin>
More information:
https://www.keycdn.com/blog/resource-hints/
https://w3c.github.io/resource-hints/
Why was this MR needed?
To improve performance especially on first load
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #49107 (closed)
Edited by Douwe Maan