dns-prefetch
-
Hi,
I would like to pre fetch some DNS with code snippet. I found n example piece of code that needs to be added to the functions.php.
When I paste it into a snippet and save it doesn’t seem to be working. So my first question is whether the snippet is being included in the functions.php or do I need to add some additional info to the snippet? The second question is what priority should I set the snippet to please?
e.g:
//* Adding DNS Prefetching
function wp_dns_prefetch() {
echo ‘<meta http-equiv=”x-dns-prefetch-control” content=”on”>
<link rel=”dns-prefetch” href=”//fonts.googleapis.com” />
<link rel=”dns-prefetch” href=”//fonts.gstatic.com” />
}
add_action(‘wp_head’, ‘wp_dns_prefetch’, 0);
The topic ‘dns-prefetch’ is closed to new replies.