mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 03:27:24 +08:00

Why this change? In https://web.dev/articles/preconnect-and-dns-prefetch, it describes how hinting to the browser to preconnect to domains which we will eventually use the connection for can help improve the time it takes to load a page. We are putting this behind an experimental flag so that we can test and profile this in a production environment. What does this change introduce? Introduce a hidden experimental `experimental_preconnect_link_header` site setting which when enabled will add the `preconnect` and `dns-prefetch` resource hints to the response headers for full page load requests.