What are render-blocking resources?

Discover tools, trends, and innovations in eu data.
Post Reply
mouakter14
Posts: 361
Joined: Tue Dec 24, 2024 5:57 am

What are render-blocking resources?

Post by mouakter14 »

Let’s say you have this cool JavaScript effect in the footer of your site. It’s powered by “coolfooter.js,” which is a script referenced at the top of your site’s code ( although the effect is in the footer, so visitors won’t see it until they scroll to the footer ).

So a very rough layout for your site's code might look something like:

Header Goal
Coolfooter.js
HTML for your content above. This is all the content a visitor sees right away ( before they start interacting with the page )
And here's why this is a problem:

When a visitor arrives at your site, their browser starts reading from top to bottom. So before it can parse and display the HTML for your site's content, it needs to wait to download and parse the coolfooter.js file.

The end result? It takes longer to display the HTML for the content above, which means your visitors will perceive your site as being slower.

When Google tells you to remove render-blocking resources, it’s essentially saying, “Hey, don’t load unnecessary resources at the top of your site’s code because it’s going to make your visitors’ browsers take longer to download the visible part of your content.”

With the tips in this post, you can wait to load certain CSS and JavaScript resources until the visible part of your page has already loaded.

When we refer to render-blocking resources, we usually talk about:

CSS
JavaScript
It's important to understand that not all CSS and JavaScript finland phone number data files

For example, it's important to load your critical CSS near the top, otherwise your visitors could experience what's known as a flash of unstyled content (FOUC).

Are images render-blocking resources?
No, images are not render-blocking . It is still important to optimize images to reduce file size, but you don't need to worry about optimizing the image delivery path.

How to test if your website has render-blocking resources?
To assess whether your WordPress site currently has render-blocking resources, you can use Google PageSpeed ​​Insights .

All you have to do is enter the URL you want to test. Then, if you have an issue with render-blocking resources, PageSpeed ​​Insights will list each individual resource in the Remove render-blocking resources section under Opportunities :
Post Reply