{"id":720350,"date":"2018-07-03T14:00:32","date_gmt":"2018-07-03T12:00:32","guid":{"rendered":"https:\/\/wp-rocket.me\/?p=720350"},"modified":"2023-08-29T13:32:10","modified_gmt":"2023-08-29T11:32:10","slug":"preload-prefetch-preconnect-speed-site-browser-resource-hints","status":"publish","type":"post","link":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/","title":{"rendered":"Preload, Prefetch, Preconnect: How to Speed Up Your WordPress Site With Browser Resource Hints"},"content":{"rendered":"<p>We use every trick in the book to speed up our websites. Optimizing images. CDNs. GZIP. Caching. But as sites become more complex and burdened by page weight, reactively responding to user interactions is not enough. We need to be proactive\u2014we need to predict what users want, and even get that content ready for them before they ask for it.<\/p><p>With resource hints and directives, you can do just that\u2014tell browsers to fetch and download resources for your pages ahead of time for better actual and perceived website performance. This technique is known as <strong>prebrowsing<\/strong>.<\/p><p>In this post, we\u2019ll explore three key resource hints: <strong>preload, prefetch, and preconnect<\/strong>, along with how they work, their benefits, and how to use them.<\/p><h2 class=\"wp-block-heading\">What is Prebrowsing?<\/h2><p>Steve Souders coined the term <a href=\"http:\/\/www.stevesouders.com\/blog\/2013\/11\/07\/prebrowsing\/\" target=\"_blank\" rel=\"noopener noreferrer\">prebrowsing<\/a> (<em>from predictive browsing<\/em>) in 2013.<\/p><p>Prebrowsing is all about anticipating user actions and preparing content on your site that they might want before they actually need it. It\u2019s a concept that\u2019s a step toward a faster internet, as A List Apart\u2019s Santiago Valdarrama writes in his article, <a href=\"https:\/\/alistapart.com\/article\/one-step-ahead-improving-performance-with-prebrowsing\/\" target=\"_blank\" rel=\"noopener noreferrer\">One Step Ahead: Improving Performance with Prebrowsing<\/a>:<\/p><p><em>\u201cBrowsers are already working behind the scenes, looking for patterns in our sites to make navigation as fast as possible. Prebrowsing builds on that: we can combine the insight we have on our own pages with further analysis of user patterns. By helping browsers do a better job, we speed up and improve the experience for our users.\u201d<\/em><\/p><p>You might be wondering, \u201cisn\u2019t this what caching is for?\u201d Well, yes. Browser caching is essential for the fast loading of pages. But there are times when caching needs a little help:<\/p><ul class=\"wp-block-list\"><li><strong>First-time website visits<\/strong>: The first time a user visits a site, their browser hasn\u2019t cached any static resources yet.<\/li>\n\n<li><strong>Cleared browser data<\/strong>: Users who clear their browser cache will no longer have a copy of your resources the next time they visit your site.<\/li>\n\n<li><strong>Expired browser data<\/strong>: According to HTTP Archive, 69% of resources don\u2019t have any caching headers or are cacheable for less than one day. If the user revisits these pages and the browser determines the resource is expired, an HTTP request is needed to check for updates. Even if the response indicates the cached resource is still valid, these network delays still make pages load more slowly, especially on mobile.<\/li>\n\n<li><strong>Old browser data<\/strong>: Even if a user has cached content from a previous visit, the website might have changed or been updated with new resources.<\/li><\/ul><p>Fortunately, browsing techniques can help you get around these issues.<\/p><h3 class=\"wp-block-heading\">1. Preload<\/h3><p>Have you ever wanted to tell the browser about an important font or script without delaying the page\u2019s onload event?<\/p><p>With <a href=\"https:\/\/www.w3.org\/TR\/preload\/\" target=\"_blank\" rel=\"noopener noreferrer\">preload<\/a>, you can do just that. This directive tells the browser that a resource is needed as part of the current navigation, and that it should start being fetched as soon as possible.<\/p><p>As <a href=\"https:\/\/twitter.com\/yoavweiss\" target=\"_blank\" rel=\"noopener noreferrer\">Yoav Weiss,<\/a> a principal architect at Akamai who worked on this web standard, explains:<\/p><p><em>\u201c[Preload provides] more granular loading control to web developers. It gives developers the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders incur.\u201d<\/em><\/p><p>When you specify a resource is needed via preload, it is downloaded as a priority and stored in the browser, waiting until it\u2019s referenced in the DOM, JavaScript or CSS.<\/p><p>The as attribute tells the browser what type of resource it will be downloading so it can be handled correctly. Without it, the browser won\u2019t use the preloaded resource. Possible values include:<\/p><ul class=\"wp-block-list\"><li>\u201cfont\u201d<\/li>\n\n<li>\u201cscript&#8221;<\/li>\n\n<li>\u201cstyle&#8221;<\/li>\n\n<li>\u201cimage&#8221;<\/li>\n\n<li>\u201cmedia&#8221;<\/li>\n\n<li>\u201cdocument&#8221;<\/li><\/ul><p>&lt;link rel=&#8221;preload&#8221;&gt; supersedes &lt;link rel=&#8221;subresource&#8221;&gt;, which, <a href=\"https:\/\/developers.google.com\/web\/updates\/2016\/03\/link-rel-preload#goodbye_link_relsubresource\" target=\"_blank\" rel=\"noopener noreferrer\">according to Google<\/a>, had significant bugs and drawbacks. It was never implemented in browsers other than Chrome. As such, Chrome 50 removed support for it in March 2016.<\/p><p>It\u2019s also important to know preload is a <em>compulsory instruction<\/em> to the browser. Unlike the other resource hints we\u2019ll look at in this post, preload is something the browser must do, rather than optionally.<\/p><p>Weiss published a definitive guide to preload prior to its release in Chrome. If you\u2019re interested in learning how to use this resource hint effectively, I highly recommend <a href=\"https:\/\/www.smashingmagazine.com\/2016\/02\/preload-what-is-it-good-for\/\" target=\"_blank\" rel=\"noopener noreferrer\">reading his guide<\/a>.<\/p><p>Don&#8217;t forget that <a href=\"https:\/\/wp-rocket.me\/google-core-web-vitals-wordpress\/improve-largest-contentful-paint\/\">preloading is also useful to optimize the Largest Contentful Paint score<\/a>.<\/p><h3 class=\"wp-block-heading\">2. Prefetch<\/h3><p>Think you can predict what the user will click or interact with next?<\/p><p>The <a href=\"https:\/\/www.w3.org\/TR\/resource-hints\/#dfn-prefetch\" target=\"_blank\" rel=\"noopener noreferrer\">prefetch<\/a> resource hint is somewhat different from preload. It doesn\u2019t try to make something critical happen faster; rather, it tries to make something non-critical happen earlier\u2014if there\u2019s a chance.<\/p><p>With prefetch, you can tell the browser to fetch resources you think the user might need later as part of a future navigation or interaction if the user takes the action you\u2019re expecting. These resources will then be fetched at the lowest priority in the browser when the current page is done loading and there\u2019s bandwidth available.<\/p><p>This means that prefetch is best used to anticipate the user\u2019s next action and prepare for it, such as retrieving necessary scripts or images.<\/p><p>There are 3 types of prefetching, and what I\u2019ve described above is typically known as <strong>link prefetching<\/strong>.<\/p><p>According to Mozilla\u2019s MDN web docs for<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Link_prefetching_FAQ\" target=\"_blank\" rel=\"noopener noreferrer\"> link prefetching<\/a>:<\/p><p><em>\u201c\u2026 After the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache. When the user visits one of the prefetched documents, it can be served up quickly out of the browser&#8217;s cache.\u201d<\/em><\/p><p>For this type of prefetching, the browser looks for prefetch either in an HTML &lt;link&gt; or an HTTP Link: header. Here\u2019s an example using the link tag:<\/p><div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;link rel=&quot;prefetch&quot; href=&quot;page-2.html&quot;&gt;<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div><p>And here\u2019s the same link prefetching hint using an <a href=\"https:\/\/wp-rocket.me\/blog\/cache-control-http-headers\/\">HTTP Link: header<\/a>:<\/p><div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">Link: &lt;\/page-2.html&gt;; rel=prefetch<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div><p>The other types of prefetching are <strong>DNS prefetching<\/strong> and <strong>prerendering<\/strong>.<\/p><h3 class=\"wp-block-heading\">DNS Prefetching<\/h3><p><a href=\"https:\/\/www.w3.org\/TR\/resource-hints\/#dns-prefetch\" target=\"_blank\" rel=\"noopener noreferrer\">DNS prefetching<\/a> lets you tell the browser to perform <a href=\"https:\/\/wp-rocket.me\/blog\/how-to-reduce-dns-lookups-to-speed-up-your-wordpress-site\/\">DNS lookups<\/a> on a page in the background while the user is browsing. So by the time the user clicks a link as anticipated, the DNS look has already taken place, thus reducing latency.<\/p><p>DNS prefetching can be added to a specific URL by adding the rel=&#8221;dns-prefetch&#8221; tag to the link attribute. For example:<\/p><div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;link rel=&quot;dns-prefetch&quot; href=&quot;\/\/fonts.googleapis.com&quot;&gt;<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div><p>Mozilla\u2019s MDN web docs <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/X-DNS-Prefetch-Control\" target=\"_blank\" rel=\"noopener noreferrer\">DNS prefetch entry<\/a> explains that:<\/p><p><em>\u201cDNS requests are very small in terms of bandwidth, but latency can be quite high, especially on mobile networks. By speculatively prefetching DNS results, latency can be reduced significantly at certain times, such as when the user clicks the link. In some cases, latency can be reduced by a second.\u201d<\/em><\/p><h3 class=\"wp-block-heading\">Prerendering<\/h3><p><a href=\"https:\/\/www.w3.org\/TR\/resource-hints\/#prerender\" target=\"_blank\" rel=\"noopener noreferrer\">Prerendering<\/a> steps things up a notch, letting you tell the browser to download entire pages.<\/p><p>Let\u2019s say, for example, you absolutely know for sure (because you checked your analytics and it\u2019s a common usage pattern) that users will land on your homepage and then proceed to visit services.html because this is the most popular navigation. You can give the browser a resource hint:<\/p><div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;link rel=&quot;prerender&quot; href=&quot;http:\/\/example.com\/services.html&quot;&gt;<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div><p>After downloading the homepage, the browser will then download services.html in the background and have it ready for the user as soon as they ask for it. When they finally click the \u201cServices\u201d link, the prerendered page will load instantaneously.<\/p><p>But what if the user doesn\u2019t click to visit your \u201cServices\u201d page and instead navigates to the \u201cAbout\u201d page? Needless to say, prerendering is a risky technique because you\u2019re gambling on a user\u2019s next move.<\/p><p>If you\u2019re right, you\u2019ll save the time of downloading a whole other page. But if you\u2019re wrong, it can cause major bandwidth waste, which is especially detrimental to mobile users.<\/p><div id=\"om-nyrydv5iync8zrrulm5i-holder\"><\/div>\n\t<script>(function (d, u, ac) {\n\t\t\tvar s = d.createElement('script')\n\t\t\ts.type = 'text\/javascript'\n\t\t\ts.src = 'https:\/\/a.omappapi.com\/app\/js\/api.min.js'\n\t\t\ts.async = true\n\t\t\ts.dataset.user = u\n\t\t\ts.dataset.campaign = ac\n\t\t\td.getElementsByTagName('head')[0].appendChild(s)\n\t\t})(document, 20440, 'nyrydv5iync8zrrulm5i')<\/script><h2 class=\"wp-block-heading\">What is Preconnect?<\/h2><p>Third-party resources can really slow a page down thanks in no small part to the number of round-trips needed before the browser can actually start downloading the resource. These round-trips include DNS lookup, TCP handshake, and TLS negotiation for HTTPS.<\/p><p>Depending on the page and the network conditions, these round-trips can add hundreds of milliseconds of latency or more, which can add up quickly if you\u2019re requesting resources from several different hosts. For example, your page might connect to Twitter and Facebook for social sharing, Gravatar for comments, and Google Analytics.<\/p><p>But what if you could eliminate some of these round-trips and speed up perceived performance and actual loading time?<\/p><p><a href=\"https:\/\/www.w3.org\/TR\/resource-hints\/#preconnect\" target=\"_blank\" rel=\"noopener noreferrer\">Preconnect<\/a> lets you tell the browser that your page intends to establish a connection to an external resource, and that you\u2019d like the process to start ASAP. Here\u2019s an example of how you would use this resource hint:<\/p><p>&lt;link rel=&#8221;preconnect&#8221; href=&#8221;https:\/\/example.com&#8221;&gt;<\/p><p>Say you wanted to speed up the display of Google Fonts webfonts on your page. The service is reliable and generally fast due to Google\u2019s global CDN. But since @font-face rules must first be discovered in CSS files before the browser makes webfont requests, there can be a noticeable flash of unstyled content (FOUC) during page render.<\/p><p>With preconnect, you can greatly reduce this delay by adding the following preconnect hint:<\/p><div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">&lt;link rel=&quot;preconnect&quot; href=&quot;https:\/\/fonts.gstatic.com&quot; crossorigin&gt;<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div><p>As Viget senior front-end developer Jeremy Frank writes in his <a href=\"https:\/\/www.viget.com\/articles\/make-your-site-faster-with-preconnect-hints\/\" target=\"_blank\" rel=\"noopener noreferrer\">guide to preconnect hints<\/a>, adding preconnect removed 3 round-trips from the critical rendering path in his testing and cut more than half a second of latency:<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/preconnect.png\" alt=\"\" class=\"wp-image-720375\"\/><\/figure><\/div><p>What\u2019s great about this particular example is that using preconnect helps to reduce rendering blocking and improves time to paint (<a href=\"https:\/\/wp-rocket.me\/google-core-web-vitals-wordpress\/improve-largest-contentful-paint\/\">including LCP once again<\/a>).<\/p><p>According to Google web performance engineer <a href=\"https:\/\/www.igvita.com\/2015\/08\/17\/eliminating-roundtrips-with-preconnect\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ilya Grigorik<\/a>:<\/p><p>\u201cPreconnect is an important tool in your optimization toolbox\u2026 it can eliminate many costly round-trips from your request path\u2014in some cases reducing the request latency by hundreds and even thousands of milliseconds.\u201d<\/p><h2 class=\"wp-block-heading\">Conclusion<\/h2><p>Prebrowsing techniques have been around for some years now and are more prevalent across the web than you may realize\u2014Google uses resource hints to make search almost instantaneous for its users.<\/p><p>Furthermore, with WP Rocket you can benefit from <a href=\"https:\/\/wp-rocket.me\/features\/\">preloading and DNS prefetching<\/a> without lifting a finger! And don&#8217;t forget that improving web performance also means <a href=\"https:\/\/wp-rocket.me\/google-core-web-vitals-wordpress\/\">improving your Core Web Vitals scores<\/a>!<\/p><p>Ready to get started with prebrowsing on your site?<br>Think about what you know about your pages and your users; start noting down user patterns, dig into your Google Analytics to find out how users navigate your site and what resources they use. Armed with this information, you can speed up and improve the user experience.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.<\/p>\n","protected":false},"author":47285,"featured_media":1499282,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"kia_subtitle":"","footnotes":""},"categories":[63],"tags":[],"class_list":["post-720350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-cache"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints<\/title>\n<meta name=\"description\" content=\"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints\" \/>\n<meta property=\"og:description\" content=\"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Rocket\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-03T12:00:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-29T11:32:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"460\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Raelene Morey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wp_rocket\" \/>\n<meta name=\"twitter:site\" content=\"@wp_rocket\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raelene Morey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\"},\"author\":{\"name\":\"Raelene Morey\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/916d553a975868ce90654f343fa25d73\"},\"headline\":\"Preload, Prefetch, Preconnect: How to Speed Up Your WordPress Site With Browser Resource Hints\",\"datePublished\":\"2018-07-03T12:00:32+00:00\",\"dateModified\":\"2023-08-29T11:32:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\"},\"wordCount\":1750,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\/\/wp-rocket.me\/#organization\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png\",\"articleSection\":[\"Page speed and caching\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\",\"url\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\",\"name\":\"Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints\",\"isPartOf\":{\"@id\":\"https:\/\/wp-rocket.me\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png\",\"datePublished\":\"2018-07-03T12:00:32+00:00\",\"dateModified\":\"2023-08-29T11:32:10+00:00\",\"description\":\"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.\",\"breadcrumb\":{\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage\",\"url\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png\",\"contentUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png\",\"width\":1100,\"height\":460,\"caption\":\"Preload, Prefetch, Preconnect\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wp-rocket.me\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Page speed and caching\",\"item\":\"https:\/\/wp-rocket.me\/blog\/wordpress-cache\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Preload, Prefetch, Preconnect: How to Speed Up Your WordPress Site With Browser Resource Hints\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wp-rocket.me\/#website\",\"url\":\"https:\/\/wp-rocket.me\/\",\"name\":\"WP Rocket\",\"description\":\"Plugin d&#039;optimisation de sites WordPress\",\"publisher\":{\"@id\":\"https:\/\/wp-rocket.me\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wp-rocket.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/wp-rocket.me\/#organization\",\"name\":\"WP Rocket\",\"url\":\"https:\/\/wp-rocket.me\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png\",\"contentUrl\":\"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png\",\"width\":150,\"height\":41,\"caption\":\"WP Rocket\"},\"image\":{\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829\",\"https:\/\/x.com\/wp_rocket\",\"https:\/\/www.youtube.com\/channel\/UC1ozThXHd1IWIZ5wkshgp_Q\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/916d553a975868ce90654f343fa25d73\",\"name\":\"Raelene Morey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wp-rocket.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fa33964c6065acf9d0348d177213ec83?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fa33964c6065acf9d0348d177213ec83?s=96&d=mm&r=g\",\"caption\":\"Raelene Morey\"},\"description\":\"Raelene Morey is the Co-Founder of Words By Birds, a digital writing agency that helps busy WordPress with writing articles, content strategies, lead magnets and other word-related things. A former journalist and editor, Raelene has been developing WordPress sites for over 10 years.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints","description":"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/","og_locale":"en_US","og_type":"article","og_title":"Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints","og_description":"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.","og_url":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/","og_site_name":"WP Rocket","article_publisher":"https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829","article_published_time":"2018-07-03T12:00:32+00:00","article_modified_time":"2023-08-29T11:32:10+00:00","og_image":[{"width":1100,"height":460,"url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png","type":"image\/png"}],"author":"Raelene Morey","twitter_card":"summary_large_image","twitter_creator":"@wp_rocket","twitter_site":"@wp_rocket","twitter_misc":{"Written by":"Raelene Morey","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#article","isPartOf":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/"},"author":{"name":"Raelene Morey","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/916d553a975868ce90654f343fa25d73"},"headline":"Preload, Prefetch, Preconnect: How to Speed Up Your WordPress Site With Browser Resource Hints","datePublished":"2018-07-03T12:00:32+00:00","dateModified":"2023-08-29T11:32:10+00:00","mainEntityOfPage":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/"},"wordCount":1750,"commentCount":8,"publisher":{"@id":"https:\/\/wp-rocket.me\/#organization"},"image":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png","articleSection":["Page speed and caching"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/","url":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/","name":"Preload, Prefetch, Preconnect in WordPress: the Browser Resource Hints","isPartOf":{"@id":"https:\/\/wp-rocket.me\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage"},"image":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage"},"thumbnailUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png","datePublished":"2018-07-03T12:00:32+00:00","dateModified":"2023-08-29T11:32:10+00:00","description":"In this guide, learn how to use prebrowsing resource hints to predict how users browse your site\u2014and fetch resources before users know they need them.","breadcrumb":{"@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#primaryimage","url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png","contentUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/resource-hints-feature-image-1.png","width":1100,"height":460,"caption":"Preload, Prefetch, Preconnect"},{"@type":"BreadcrumbList","@id":"https:\/\/wp-rocket.me\/blog\/preload-prefetch-preconnect-speed-site-browser-resource-hints\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wp-rocket.me"},{"@type":"ListItem","position":2,"name":"Page speed and caching","item":"https:\/\/wp-rocket.me\/blog\/wordpress-cache\/"},{"@type":"ListItem","position":3,"name":"Preload, Prefetch, Preconnect: How to Speed Up Your WordPress Site With Browser Resource Hints"}]},{"@type":"WebSite","@id":"https:\/\/wp-rocket.me\/#website","url":"https:\/\/wp-rocket.me\/","name":"WP Rocket","description":"Plugin d&#039;optimisation de sites WordPress","publisher":{"@id":"https:\/\/wp-rocket.me\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wp-rocket.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wp-rocket.me\/#organization","name":"WP Rocket","url":"https:\/\/wp-rocket.me\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/","url":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png","contentUrl":"https:\/\/wp-rocket.me\/wp-content\/uploads\/1\/logo-wp-rocket-paypal-2.png","width":150,"height":41,"caption":"WP Rocket"},"image":{"@id":"https:\/\/wp-rocket.me\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/WP-Rocket\/631942253526829","https:\/\/x.com\/wp_rocket","https:\/\/www.youtube.com\/channel\/UC1ozThXHd1IWIZ5wkshgp_Q"]},{"@type":"Person","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/916d553a975868ce90654f343fa25d73","name":"Raelene Morey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-rocket.me\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa33964c6065acf9d0348d177213ec83?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fa33964c6065acf9d0348d177213ec83?s=96&d=mm&r=g","caption":"Raelene Morey"},"description":"Raelene Morey is the Co-Founder of Words By Birds, a digital writing agency that helps busy WordPress with writing articles, content strategies, lead magnets and other word-related things. A former journalist and editor, Raelene has been developing WordPress sites for over 10 years."}]}},"_links":{"self":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts\/720350"}],"collection":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/users\/47285"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/comments?post=720350"}],"version-history":[{"count":0,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/posts\/720350\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/media\/1499282"}],"wp:attachment":[{"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/media?parent=720350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/categories?post=720350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp-rocket.me\/wp-json\/wp\/v2\/tags?post=720350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}