3 ms·
I prefer HTTP headers instead of meta tags where possible. An example solution at the load balancer level, assuming the use of Varnish: In vcl_fetch: if (r
by buro9 16y ago
I prefer HTTP headers instead of meta tags where possible.
An example solution at the load balancer level, assuming the use of Varnish:
In vcl_fetch:
if (req.url ~ "\.(htm|html|php)" || req.url ~ "\/(\?.*)?$") {
set beresp.http.disable-dns-prefetch = "1";
}
In vcl_deliver:
if (resp.http.disable-dns-prefetch) {
remove resp.http.disable-dns-prefetch;
set resp.http.X-DNS-Prefetch-Control = "off";
}