{"id":7717,"date":"2022-02-18T17:30:06","date_gmt":"2022-02-18T16:30:06","guid":{"rendered":"https:\/\/f.technology\/blog\/wordpress-en\/preloading-in-wp-rocket\/"},"modified":"2022-02-18T17:30:06","modified_gmt":"2022-02-18T16:30:06","slug":"preloading-in-wp-rocket","status":"publish","type":"post","link":"https:\/\/f.technology\/en\/blog\/performance-en\/preloading-in-wp-rocket\/","title":{"rendered":"Preloading in WP Rocket"},"content":{"rendered":"<p>The <strong>Preloading<\/strong> section of <a href=\"https:\/\/wp-rocket.me\/it\/\" target=\"_blank\" rel=\"noopener nofollow\"><strong>WP Rocket<\/strong><\/a>, as the name suggests, is about <strong>pre-generation<\/strong> of different entities.<br \/>\nIt is divided into 3 parts:   <\/p>\n<ul>\n<li>Preloading <strong><em>cache<\/em><\/strong>,<\/li>\n<li>Preloading <strong><em>link<\/em><\/strong>,<\/li>\n<li>Preloading <strong><em>DNS requests<\/em><\/strong>.<\/li>\n<\/ul>\n<p>  For complete documentation, please refer to the <a href=\"https:\/\/docs.wp-rocket.me\/article\/8-how-the-cache-is-preloaded\" target=\"_blank\" rel=\"noopener nofollow\">official page<\/a>.<br \/>\n<em>As always, we recommend that you inquire about the integration between <strong>WP Rockete<\/strong>your <strong>server<\/strong>!<\/em> For example, in the case of <a href=\"https:\/\/kinsta.com\/it\/partner\/wp-rocket\/\" target=\"_blank\" rel=\"noopener nofollow\">Kinsta<\/a>, even if WP Rocket is fully compatible, some features such as cache preloading or file minification (should the Kinsta server-side one also be enabled) are <a href=\"https:\/\/kinsta.com\/it\/blog\/wp-rocket\/\" target=\"_blank\" rel=\"noopener nofollow\">not recommended<\/a>.   <\/p>\n<h2>Cache preloading<\/h2>\n<p> <strong>Page<\/strong><em>cache preloading (cache preload<\/em>) involves the <strong>page<\/strong> <strong><em>cache <\/em><\/strong> being <strong>generated<\/strong> independently by WP Rocket, regardless of user interactions.<br \/>\nAs seen in the <a href=\"https:\/\/f.technology\/blog\/performance\/basi-di-wp-rocket\/\" rel=\"nofollow\">previous article<\/a>, this is a<strong>recommended and default setting<\/strong> of WP Rocket.<br \/>\nIf preloading is turned off, each page will require at least one visit to be <em>cached<\/em>.<br \/>\nTherefore, the first user will always view it slower. <img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-311 size-full\" src=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-cache.jpg\" alt=\"preloading wp rocket\" width=\"825\" height=\"503\" srcset=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-cache.jpg 825w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-cache-300x183.jpg 300w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-cache-768x468.jpg 768w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/> If enabled without additional options, WP Rocket will generate the cache starting from the home page and continuing independently based on all detected <em>links<\/em>.<br \/>\nBy activating the <strong>&#8220;Enable cache preloading based on sitemap&#8221;<\/strong> option, the <strong>sitemap<\/strong> is automatically detected and preloaded.<br \/>\nSometimes it is also possible to confirm the detected <em>sitemap<\/em>.<br \/>\nThis is the case with <strong>Yoast SEO<\/strong>: <img decoding=\"async\" class=\"alignnone wp-image-313 size-full\" src=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-attiva.jpg\" alt=\"wp rocket active preloading\" width=\"540\" height=\"436\" srcset=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-attiva.jpg 540w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-attiva-300x242.jpg 300w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/> Cache preloading occurs globally:        <\/p>\n<ul>\n<li>When <strong>the <em>cache<\/em> expires<\/strong>,<\/li>\n<li>With each <strong>save of<\/strong> WP Rocket <strong>settings<\/strong>,<\/li>\n<li>Upon clicking the appropriate<strong>&#8220;Preload cache<\/strong>&#8221; command,<\/li>\n<li>Upon<strong>activation of the <em>plugin<\/em><\/strong>,<\/li>\n<li>On <strong>clearing the <em>cache<\/em><\/strong>.<\/li>\n<li>In additional cases determined by specific <em>servers<\/em> or <em>plugins<\/em> such as<em> Varnish HTTP Purge<\/em>.<\/li>\n<\/ul>\n<p>  Individually, it occurs when <strong>publishing\/updating content<\/strong>.<br \/>\nIf <strong>mobile version <em>cache<\/em> separation<\/strong> is enabled, the <strong>mobile version cache<\/strong> is also preloaded along with the <em>desktop<\/em> part: <img decoding=\"async\" class=\"alignnone wp-image-308 size-full\" src=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/06-cache-utente.jpg\" alt=\"user cache preloading\" width=\"1001\" height=\"599\" srcset=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/06-cache-utente.jpg 1001w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/06-cache-utente-300x180.jpg 300w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/06-cache-utente-768x460.jpg 768w\" sizes=\"(max-width: 1001px) 100vw, 1001px\" \/> If <strong>WebP compatibility<\/strong> is enabled, WP Rocket will preload that cache instead of the non-WebP cache for the files involved.<br \/>\nTo verify that the cache preloading is <strong>working properly<\/strong>, access via FTP to the \/wp-content\/cache\/wp-rocket\/name\/ folder.<br \/>\nInside will be all the cache files created.<br \/>\nBy clicking on &#8220;Preload cache,&#8221; the contents of the folder will be updated. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-310\" src=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-funzionamento.jpg\" alt=\"\" width=\"1138\" height=\"602\" srcset=\"https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-funzionamento.jpg 1138w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-funzionamento-300x159.jpg 300w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-funzionamento-1024x542.jpg 1024w, https:\/\/f.technology\/wp-content\/uploads\/2022\/10\/precaricamento-funzionamento-768x406.jpg 768w\" sizes=\"(max-width: 1138px) 100vw, 1138px\" \/> Through plugins such as <a href=\"https:\/\/wordpress.org\/plugins\/wp-cron-status-checker\/\" target=\"_blank\" rel=\"noopener nofollow\">WP-Cron Status Checker<\/a> or <a href=\"https:\/\/wordpress.org\/plugins\/wp-crontrol\/\" target=\"_blank\" rel=\"noopener nofollow\">WP Crontrol<\/a>, it is also possible to check the scheduling of preload actions.<br \/>\nNot to be underestimated, the chesty site health panel viewable in <strong>Settings &#8211;&gt; Site Health.<\/strong><br \/>\nFrom here we can verify that planned events have not failed.<br \/>\nIf an error 28 related to cURLs appears, this normally indicates a slow response from the server.<br \/>\nIn such a case, the suggestion is to contact the service provider.          <\/p>\n<h3>More information about <em>cache<\/em> preloading<\/h3>\n<p> <em>Cache<\/em> preloading never consumes <strong>more than 90% of<\/strong> the available PHP memory.<br \/>\nCPU utilization problems should never occur.<br \/>\n <em>Sitemap-based<\/em> preloading requires that <strong>on<\/strong><em><strong> server<\/strong><\/em><a href=\"http:\/\/php.net\/manual\/en\/book.simplexml.php\" target=\"_blank\" rel=\"noopener nofollow\">SimpleXML PHP<\/a> extension is enabled.<br \/>\nThe default interval for crawling between URLs is 500ms.<br \/>\nIt is possible to change it using an extension.<br \/>\nIt is possible to schedule <em>cache<\/em> preloading by creating an appropriate <em>cron.<\/em>      <\/p>\n<h2>Preloading of links<\/h2>\n<p>  Only on <strong>Chrome<\/strong> and <strong>Chromium<\/strong> <em>browsers<\/em>! <strong> <em>Link<\/em> preloading<\/strong> improves the perceived interaction time of the user browsing the site.<br \/>\nIf the user scrolls over a <em>link<\/em> for more than 100 ms, the HTML content of the linked page will be preloaded in the background.<br \/>\nThe option <strong>does not result in improvements<\/strong> in PageSpeed scores, Pingdom, GT Metrix, etc.<br \/>\nThey are automatically excluded:     <\/p>\n<ul>\n<li>Miscellaneous administration URLs;<\/li>\n<li>URLs excluded from WP Rocket <em>cache<\/em>;<\/li>\n<li>Images;<\/li>\n<li><em>Links<\/em> with search strings and anchors;<\/li>\n<li>External URLs.<\/li>\n<\/ul>\n<p>  It is also possible to <strong>manually exclude<\/strong> specific URLs, by function.  <em><strong>Warning.<br \/>\nFiles (including .docx) are not excluded from link preloading. <\/strong>  This can cause errors mainly due to the automatically queued &#8220;\/&#8221; slash.<\/em><br \/>\n<em>To avoid this, rules can be created using the <a href=\"https:\/\/github.com\/wp-media\/wp-rocket-helpers\/raw\/master\/cache\/wp-rocket-no-cache-urls-regexes\/wp-rocket-no-cache-urls-regexes.zip\" target=\"_blank\" rel=\"noopener nofollow\">WP Rocket | Regex Exclusions<\/a> extension.<\/em><\/p>\n<h2>Preloading DNS Requests<\/h2>\n<p> <strong>Preloading<\/strong><em>DNS<\/em> <strong>requests<\/strong><em>(DNS prefetch<\/em>) comes in particularly handy if there is third-party content on the page.<br \/>\nIt causes <strong>DNS resolution<\/strong> to occur <strong>before the user&#8217;s interaction<\/strong> with the external content.<br \/>\nTechnically, it is added<code>rel=\"dns-prefetch\"<\/code> to the header.<br \/>\nFor example, CDN, Google fonts, Pixel, Analytics, Tag Manager are handled in this case: <\/p>\n<pre>&lt;link rel=\"<span class=\"nt\">dns-prefetch<\/span>\" href=\"<span class=\"na\">https:\/\/cdn.domain.com<\/span>\"&gt;\n&lt;link rel=\"<span class=\"nt\">dns-prefetch<\/span>\" href=\"<span class=\"na\">https:\/\/fonts.gstatic.com<\/span>\"&gt;\n&lt;link rel=\"<span class=\"nt\">dns-prefetch<\/span>\" href=\"<span class=\"na\">https:\/\/connect.facebook.net<\/span>\"&gt;\n&lt;link rel=\"<span class=\"nt\">dns-prefetch<\/span>\" href=\"<span class=\"na\">https:\/\/www.google-analytics.com<\/span>\"&gt;\n&lt;link rel=\"<span class=\"nt\">dns-prefetch<\/span>\" href=\"<span class=\"na\">https:\/\/www.googletagservices.com<\/span>\"&gt;<\/pre>\n<p> The improvement is not easily evaluated, but it is a <strong>recommended practice<\/strong>. <strong>GT Metrix<\/strong> may suggest reducing DNS<em>lookups (Reduce DNS Lookups<\/em>).<br \/>\nDNS preloading does not <strong>result in the elimination of the suggestion<\/strong>: it does not eliminate requests, but anticipates them.<br \/>\nThe only permanent solution remains the <strong>removal of third-party content<\/strong>.       <\/p>\n<h2>Preload <em>fonts<\/em><\/h2>\n<p>  Preloading <em>fonts<\/em> within the element<code>&lt;head&gt;<\/code>, these will be <strong>downloaded before being identified<\/strong> within the CSS.<br \/>\nIf the <em>fonts<\/em> are located on <strong>the domain or CDN<\/strong>, it is recommended to<strong> enable the option.<\/strong><br \/>\nYou cannot take advantage of the feature when they are located externally.    <em>If the &#8220;Remove Unused CSS&#8221; option is enabled within &#8220;File Optimization,&#8221; pre-loaded fonts will also be removed.<\/em><\/p>\n<h3>Which <em>fonts<\/em> to preload?<\/h3>\n<p><strong>Google PageSpeed<\/strong> provides a &#8220;Preload Key Requests&#8221; entry.<br \/>\nIt is useful to start the test by bypassing WP Rocket with parameter <strong>\/?nowprocket<\/strong>.<br \/>\nAlso, the URL must match the one provided by PageSpeed.<br \/>\n <strong>Only <em>fonts<\/em> that slow down page loading or perceived performance<\/strong> should be preloaded.<br \/>\nPreloading can be <strong>counterproductive if it involves too many <em>fonts<\/em><\/strong>.      <em>Do not preload multiple formats!<br \/>\nNormally <strong>.woff2<\/strong> is sufficient. <\/em><\/p>\n<h3>Notice of PageSpeed<\/h3>\n<blockquote><p>Warnings: Lighthouse was unable to automatically check the `font-display` value for the origin<\/p><\/blockquote>\n<p>  It is usually caused by preloading unused fonts.<br \/>\nIn such cases Chrome also shows a similar warning.   <\/p>\n<h3>Preloading of external fonts<\/h3>\n<p>  It is not possible to implement this with WP Rocket.<br \/>\nHowever, an appropriate HTML line can be added in the <code>&lt;head&gt;<\/code> section. <\/p>\n<pre><code>&lt;link rel=\"preload\" href=\"https:\/\/ESEMPIO.COM\/FONT.woff2\" as=\"font\" type=\"font\/woff2\" crossorigin&gt;<\/code><\/pre>\n<p> The correct URL must be entered.<br \/>\nThe <em>type<\/em> attribute should identify the correct format.<br \/>\nOnce the code is entered, clear the WP Rocket cache.   <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Preloading section of WP Rocket, as the name suggests, is about pre-generation of different entities. It is divided into 3 parts: Preloading cache, Preloading link, Preloading DNS requests. For complete documentation, please refer to the official page. As always, we recommend that you inquire about the integration between WP Rocketeyour server! For example, in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3452,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[75],"tags":[],"class_list":["post-7717","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/posts\/7717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/comments?post=7717"}],"version-history":[{"count":0,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/posts\/7717\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/media\/3452"}],"wp:attachment":[{"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/media?parent=7717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/categories?post=7717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/f.technology\/en\/wp-json\/wp\/v2\/tags?post=7717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 6a502699d36f7385bd15d6ad. Config Timestamp: 2026-07-09 22:54:16 UTC, Cached Timestamp: 2026-07-11 04:42:37 UTC -->