{"id":18747,"date":"2020-02-25T16:40:46","date_gmt":"2020-02-25T21:40:46","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=18747"},"modified":"2024-03-21T13:53:10","modified_gmt":"2024-03-21T17:53:10","slug":"w3-total-cache-minify-faq","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/w3-total-cache-minify-faq\/","title":{"rendered":"W3 Total Cache Minify FAQ"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><div class=\"boldgrid-section\" style=\"margin-top: 60px;\">\n<div class=\"container w3tc-radius\" style=\"border-width: 0px; background-image: url('https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png'); background-size: cover; background-position: 50% 5%;\" data-image-url=\"https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png\">\n<div class=\"row upsell-column\" style=\"padding-top: 2em; padding-bottom: 2em; color: #ffffff;\">\n<div class=\"col-lg-1 col-md-1 col-sm-12 col-xs-12 hidden-sm\"><\/div>\n<div class=\"col-lg-5 col-md-6 col-xs-12 col-sm-7\">\n<p class=\"\" style=\"color: #ffffff; margin-top: 0;\">Improve your website performance with Minify and <strong>W3 Total Cache Pro<\/strong>.<\/p>\n<\/div>\n<div class=\"col-lg-6 col-md-5 col-sm-5 col-xs-12 text-center align-column-center\">\n<p class=\"\" style=\"border-width: 0px;\"><a class=\"button-w3tc-white\" style=\"border: 2px solid #30BEC4; font-size: 18px; padding: 15px 30px;\" href=\"https:\/\/www.boldgrid.com\/w3-total-cache\/#pricing\">View Plans<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<h3 id=\"what-can-i-do-to-speed-up-the-delivery-of-static-assets\">What can I do to speed up the delivery of static assets?<\/h3>\n<p>HTTP\/2 push &ndash; can be enabled to send assets contents right with the HTML content which speeds up rendering time.<\/p>\n<h3 id=\"how-can-i-eliminate-render-blocking-css\">How can I eliminate render blocking CSS?<\/h3>\n<p>W3 Total Cache can help with that by embedding CSS assets included an external asset to HTML. The only drawback is that CSS is sent on each page visit, so naturally it is not taken from browser cache.&nbsp; so you get faster page rendering for the 1st visit and slower for subsequent visits. This is only suggested when website has a small amount of CSS, otherwise it&rsquo;s better to use HTTP\/2 pushing.<\/p>\n<h3 id=\"what-can-i-do-about-external-scripts-and-stylesheets\">What can I do about external scripts and stylesheets?<\/h3>\n<p>Fine-tuning &ndash; you can add your external assets to minified assets to avoid multiple DNS resolution and connection handshakes.<\/p>\n<h3 id=\"how-can-i-eliminate-render-blocking-javascript\">How can I eliminate render blocking Javascript?<\/h3>\n<p>Eliminating render blocking JS files is the same thing as deferring them. When a javascript file is deferred, it is not executed right at the HTML page parsing point of time, but after the page is initially rendered and the visitor has began reading the content.<\/p>\n<p>Our team provides this as a <a href=\"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/w3-total-cache-support-options-and-premium-services\/\">Premium Service,<\/a> but in some simple cases may be solved via Minify Manual mode without coding. You can select the scripts you want to change, their placement and order, and the way they are included (async\/defer).<\/p>\n<h3 id=\"how-can-i-reduce-unused-javascript-and-css\">How can I Reduce Unused JavaScript and CSS?<\/h3>\n<p>Lighthouse and Google PageSpeed Insights may advise you to <strong>Reduce Unused JavaScript<\/strong> or to <strong>Reduce Unused CSS<\/strong>. This can be one of the most difficult recommendations to follow, for a few reasons.<\/p>\n<p>First, the recommendation engine itself is pretty simple. Take this example of pseudo-code:<\/p>\n<pre>if ( is_page('home') ) {\r\n   \/* A chunk of code that only displays on the homepage *\/\r\n} else {\r\n   \/* A chunk of code that displays on all other pages *\/\r\n}\r\n<\/pre>\n<p>In this example, if you were to run PageSpeed Insights on your home page, everything in the code block that displays on all your other pages counts as &ldquo;unused.&rdquo; Because of this, you should keep in mind that the &ldquo;unused&rdquo; measurements aren&rsquo;t always a completely accurate measurement. Similarly, if your CSS includes rules for elements that only appear on certain pages, that will also show up as &ldquo;unused&rdquo; even though you may be using those CSS rules on other pages of your website.<\/p>\n<p>The most effective way to remove unused JavaScript and CSS is to remove any extraneous plugins that you may have on your website. In addition, make sure that the plugins you do choose to use only enqueue their assets on pages that use those plugins. Learn more about the <a href=\"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/remove-cssjs\/\" target=\"_blank\" rel=\"noopener\">removing CSS and JS with the new Pro Feature<\/a> from W3 Total Cache.<\/p>\n<p><a href=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template.png\" rel=\"lightbox\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-39970\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template-300x39.png\" alt=\"Including Assets only on Certain Templates\" width=\"300\" height=\"39\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template-300x39.png 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template-1024x133.png 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template-768x99.png 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/02\/manual-minify-template.png 1089w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Using Manual Minify, you have the ability to only include JavaScript and CSS Assets on certain theme templates. You can utilize this feature to create templates within your theme that need additional assets. For example, if you have a Contact Form, you can create a unique contact form template and include your form plugin&rsquo;s assets only on that template.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Improve your website performance with Minify and W3 Total Cache Pro. View Plans Frequently Asked Questions What can I do to speed up the delivery of static assets? HTTP\/2 push &ndash; can be enabled to send assets contents right with the HTML content which speeds up rendering time. How can I eliminate render blocking CSS? [&hellip;]<\/p>\n","protected":false},"author":529,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[741,692],"tags":[],"class_list":["post-18747","post","type-post","status-publish","format-standard","hentry","category-minify","category-w3-total-cache"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/529"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=18747"}],"version-history":[{"count":11,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18747\/revisions"}],"predecessor-version":[{"id":128470,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18747\/revisions\/128470"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=18747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=18747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=18747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}