The main reason for rel prefetch tags exist is to speed up the way web pages load resources.
I found the prefetch commands to be less useful than I initially hoped for because web browsers have gotten very smart and can already anticipate and prioritize which resources are required based on heuristics and the users history.
But the prefetch tags can give the browser an extra hint and look ahead to determine how to cache requests.
Prefetch can help some sites more than others and is a tactic worthwhile for all when implemented correctly. If you don't use prefetch correctly then you can actually slow down your site and make it less secure.
I've attached a link below that explains prefetching.
dns-prefetch
I didn't find dns-prefetch tag very useful because of the way dns is already propagated and the security risks involved.
dns-prefetch is only useful for third party assets. My third party partners, like Google, Cloudflare, Symantec have DNS lookup times of around 30 ms so there isn't much savings. Because of the way DNS propagates, IMHO dns-prefetch is only helpful if you are requesting assets from a domain with limited popularity.
Also, dns-prefetch to https sites is turned off by default because of its inherent security risks of data exfiltration. So if you needed to dns-prefetch secure resources you would need to set a header:
Prefetch
Prefetch is a low priority command that will cause the browser to get resources and happens in a background tab and stored to http-cache.
The prefetched resource is ignored and will not be loaded from the background tab if it is made by a POST request.
So I thought I could make my Check-Out pages faster if I preloaded BASK > OCST > OSEL > OPAY but the requests are ignored because they are POST requests.
I looked at my analytics paths Behavior > Behavior Flow > Landing Pages and found some pages to prefetch
Prerender
Prefetching is somewhat of a guessing game that I find prerender to be overkill use of bandwidth and can skew analytic results that I avoid it.
I found the prefetch commands to be less useful than I initially hoped for because web browsers have gotten very smart and can already anticipate and prioritize which resources are required based on heuristics and the users history.
But the prefetch tags can give the browser an extra hint and look ahead to determine how to cache requests.
Prefetch can help some sites more than others and is a tactic worthwhile for all when implemented correctly. If you don't use prefetch correctly then you can actually slow down your site and make it less secure.
I've attached a link below that explains prefetching.
dns-prefetch
I didn't find dns-prefetch tag very useful because of the way dns is already propagated and the security risks involved.
dns-prefetch is only useful for third party assets. My third party partners, like Google, Cloudflare, Symantec have DNS lookup times of around 30 ms so there isn't much savings. Because of the way DNS propagates, IMHO dns-prefetch is only helpful if you are requesting assets from a domain with limited popularity.
Also, dns-prefetch to https sites is turned off by default because of its inherent security risks of data exfiltration. So if you needed to dns-prefetch secure resources you would need to set a header:
Code:
x-dns-prefetch-control: on
Prefetch is a low priority command that will cause the browser to get resources and happens in a background tab and stored to http-cache.
The prefetched resource is ignored and will not be loaded from the background tab if it is made by a POST request.
So I thought I could make my Check-Out pages faster if I preloaded BASK > OCST > OSEL > OPAY but the requests are ignored because they are POST requests.
I looked at my analytics paths Behavior > Behavior Flow > Landing Pages and found some pages to prefetch
Code:
<mvt:if expr="'YOUR_PAGE_CODE' CIN g.category_code" > <link rel="prefetch" href="https://www.example.com/your-next-page-path.html"> </mvt:if>
Prefetching is somewhat of a guessing game that I find prerender to be overkill use of bandwidth and can skew analytic results that I avoid it.