4 ms·
I'm surprised the article doesn't actually tell you the meta http-equiv to disable DNS prefetching. It mentions that it helped out tremendously, though. Here it
by coderdude 16y ago
I'm surprised the article doesn't actually tell you the meta http-equiv to disable DNS prefetching. It mentions that it helped out tremendously, though. Here it is:
<meta http-equiv="x-dns-prefetch-control" content="off" />
or, if you're more into HTML5:
<meta http-equiv="x-dns-prefetch-control" content="off">
- buro9 16y agoI 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"; }
- rodion_89 16y agoNot closing the tag is nothing specific to HTML5, it just means you aren't strict on XHTML. HTML4 and others would be the same.
- coderdude 16y agoWell sure, but why does that matter? I could have said "or if you're more into HTML 4.01, 5, and anything before those versions of HTML..." Pedantic.
- phillijw 16y agoWhy don't you just say "HTML"
- rodion_89 16y agoI suppose it's just the irritation from the term HTML5 being used in all sorts of inaccurate or misleading ways. What you said wasn't inaccurate, but I feel like throwing in the term HTML5 was unnecessary. But yeah, it's pedantic. It's mostly me being irritated by others.