Eliminate render-blocking resources

KungFuKata

Regular Member
Joined
Jan 8, 2017
Messages
283
Reaction score
150
Hi, I have this issue for my webpage, how to get rid of it?

I tried to google it but have not quite understand the problem :(

Please help, thanks in advance.
 
Are you using Wordpress? If so, it should be fairly simple to get rid of most render blocking resources by using a cache plugin such as WP-Rocket, or something similar to defer loading of Javascript etc.

Look up Festingers vault here in BHW for easy access to premium cache plugins for WP.
 
I have wp rocket, but it have not helped :(
 
In WP-Rocket make sure you have the CSS optimization + defer javascript enabled etc on the 'File Optimization' tab.

It may not be desirable, or even possible to eliminate all render blocking resources especially if your theme / plugins make use of Jquery, which probably needs to be loaded before other elements of the page such as menus and overlays etc.

The google pagespeed insights tool should be able to tell you what the render blocking resources are - it's usually stuff like CSS + Javascript such as jquery. How much of a problem are these render blocking resources? What pagespeed score does your site get?
 
If you´re referring to CSS, I am sorry to say but CSS is render-blocking by nature.

But, this doesn´t mean we can´t do anything to optimize the delivery of CSS.

One of the best tactics you can implement in order to address this issue is to remove any and all unused CSS loading on the page. This is what´s commonly known as Critical Path CSS (CPCSS). So, the site will only load the required stylesheets needed to properly render the above-the-fold content of the page.

The rest can be loaded either async or on user interaction. Personally, I prefer async.

Unfortunately, to generate the CPCSS it has to be done through a plugin. Unless you have experience with this and can do it manually.

I´ve tested free tools and cracked/hacked/nulled plugins like WP Rocket and Perfmatters and non of them do a good job with this.

The best solution I´ve found it´s through a combination of CriticalCSS (PAID), Autoptimize (FREE), and Async JavaScript (FREE).

Alternatively, you can use plugin managers like Asset Cleanup (it has a free version) or Perfmatters (PAID) to remove any unused CSS and JS from ever loading on pages they are not being used.

One clear example of this is the Contact Form 7 plugin.

That is what I called a "site-wide" plugin because, once it's active on your site, it will inject code on every single page on your site whether you´re using it or not. So, with a plugin like Perfmatter you can create a rule to only load those resources on the pages you´re actually using it.

Asset Cleanup will do the work for you but I prefer Perfmatters.

Thanks to @RoiBox, you can get the latest version of Perfmatters for free on this thread.

If you have never used Perfmatters, I recommend you to take the time and watch this 2 hour-long interview where the developer behind the plugin walks you through and explains the ins and out of the plugin and how to use it properly...


As a rule of thumb, you need to focus on the following...
  • Disable slider plugin on pages that don’t use sliders
  • Disable rich snippets plugin on pages that don’t use rich snippets
  • Disable contact form plugin on pages that don’t have a contact form
  • Disable WooCommerce scripts and styles on non-eCommerce pages
  • Disable affiliate link management plugin on pages that don’t use aff links
  • Disable social sharing plugin on all pages (since it’s usually for blog posts)
  • Disable unused functionality in your page builder
  • And so on (by now you should get an idea)
On the other hand and if you´re using Google fonts, there´s no need to "force" visitors´ browsers to make a DNS lookup for a static resource. So, instead, download and host them locally for better performance.

For that, you can use a free plugin called OMGF | Host Google Fonts Locally that will do the job.

Lastly and, as a general rule, I recommend you to follow these simple rules in order to avoid these headaches...
  • Use a lightweight and premium theme
    • GeneratePress, Astra Pro, OceanWP, etc.
  • Avoid page builders!
    • Instead, either try to build your site using Gutemberg (if you´re not using dynamic content) or take the time to learn how to use Oxygen.
  • Avoid jQuery Heavy Plugins
  • Avoid using sliders!
    • At the very least, stop using them above the fold.
  • Go easy with third-party apps
    • Stuff like Google Analytics and Google Tag Manager is essential these days but stuff like video embedding, google maps, Gravatars, Adsense, heatmaps, etc., will kill your site´s performance.

I hope this helps, cheers!
 
If you´re referring to CSS, I am sorry to say but CSS is render-blocking by nature.

But, this doesn´t mean we can´t do anything to optimize the delivery of CSS.

One of the best tactics you can implement in order to address this issue is to remove any and all unused CSS loading on the page. This is what´s commonly known as Critical Path CSS (CPCSS). So, the site will only load the required stylesheets needed to properly render the above-the-fold content of the page.

The rest can be loaded either async or on user interaction. Personally, I prefer async.

Unfortunately, to generate the CPCSS it has to be done through a plugin. Unless you have experience with this and can do it manually.

I´ve tested free tools and cracked/hacked/nulled plugins like WP Rocket and Perfmatters and non of them do a good job with this.

The best solution I´ve found it´s through a combination of CriticalCSS (PAID), Autoptimize (FREE), and Async JavaScript (FREE).

Alternatively, you can use plugin managers like Asset Cleanup (it has a free version) or Perfmatters (PAID) to remove any unused CSS and JS from ever loading on pages they are not being used.

One clear example of this is the Contact Form 7 plugin.

That is what I called a "site-wide" plugin because, once it's active on your site, it will inject code on every single page on your site whether you´re using it or not. So, with a plugin like Perfmatter you can create a rule to only load those resources on the pages you´re actually using it.

Asset Cleanup will do the work for you but I prefer Perfmatters.

Thanks to @RoiBox, you can get the latest version of Perfmatters for free on this thread.

If you have never used Perfmatters, I recommend you to take the time and watch this 2 hour-long interview where the developer behind the plugin walks you through and explains the ins and out of the plugin and how to use it properly...


As a rule of thumb, you need to focus on the following...
  • Disable slider plugin on pages that don’t use sliders
  • Disable rich snippets plugin on pages that don’t use rich snippets
  • Disable contact form plugin on pages that don’t have a contact form
  • Disable WooCommerce scripts and styles on non-eCommerce pages
  • Disable affiliate link management plugin on pages that don’t use aff links
  • Disable social sharing plugin on all pages (since it’s usually for blog posts)
  • Disable unused functionality in your page builder
  • And so on (by now you should get an idea)
On the other hand and if you´re using Google fonts, there´s no need to "force" visitors´ browsers to make a DNS lookup for a static resource. So, instead, download and host them locally for better performance.

For that, you can use a free plugin called OMGF | Host Google Fonts Locally that will do the job.

Lastly and, as a general rule, I recommend you to follow these simple rules in order to avoid these headaches...
  • Use a lightweight and premium theme
    • GeneratePress, Astra Pro, OceanWP, etc.
  • Avoid page builders!
    • Instead, either try to build your site using Gutemberg (if you´re not using dynamic content) or take the time to learn how to use Oxygen.
  • Avoid jQuery Heavy Plugins
  • Avoid using sliders!
    • At the very least, stop using them above the fold.
  • Go easy with third-party apps
    • Stuff like Google Analytics and Google Tag Manager is essential these days but stuff like video embedding, google maps, Gravatars, Adsense, heatmaps, etc., will kill your site´s performance.

I hope this helps, cheers!
Thank you!!!
 
Back
Top