When a website is loaded if it contains images
Posted: Tue Dec 24, 2024 10:43 am
When a website is loaded if it contains images all of them will be loaded, even ones below the fold. This is a waste of resources and network usage since the images are viewable. Luckily deferring offscreen images is easier than ever now that all major browser support lazy loading.
By default, WordPress will apply the loading=”lazy” attribute to images to automatically defer offscreen images so you likely won’t see this error. WP-Rocket will also apply lazy loading to images, iFrames, and YouTube embeds. Alternatively you can use the free a3 Lazy Load plugin to apply lazing loading to off-screen elements. If your site has a lot of image files and gifs this is important aspect of improving page load.
For Developers: The easiest way to add lazy loading to an image is to include Colombia Phone Number Library loading=”lazy” attribute in the <img> tag. There are also plenty of JavaScript libraries to lazy load content.
All Text Remains Visible During Webfont Loads
When webfonts were introduced it was common practice to hide text before the font loaded. This is a big no-no since users want to instantly start reading your site. WP-Rocket will automatically optimize webfont display when CSS optimizations are enabled. The free WordPress plugin Swap Google Fonts Display will also add the correct parameter to Google Fonts for your WordPress site.
For Developers: Likely you’re using Google Fonts which is quite simple to resolve this finding. All you have to do is add the “&display=swap”query string to your Google Font URL; more details from Google.
Avoid Multiple Page Redirects
If your site has a lot of redirects these will slowly increase page load speed. For example if your homepage / goes to /home.html this will cause a delay in response to your users. You may see this error if you have CSS or JS files that lead to a redirect as well.
By default, WordPress will apply the loading=”lazy” attribute to images to automatically defer offscreen images so you likely won’t see this error. WP-Rocket will also apply lazy loading to images, iFrames, and YouTube embeds. Alternatively you can use the free a3 Lazy Load plugin to apply lazing loading to off-screen elements. If your site has a lot of image files and gifs this is important aspect of improving page load.
For Developers: The easiest way to add lazy loading to an image is to include Colombia Phone Number Library loading=”lazy” attribute in the <img> tag. There are also plenty of JavaScript libraries to lazy load content.
All Text Remains Visible During Webfont Loads
When webfonts were introduced it was common practice to hide text before the font loaded. This is a big no-no since users want to instantly start reading your site. WP-Rocket will automatically optimize webfont display when CSS optimizations are enabled. The free WordPress plugin Swap Google Fonts Display will also add the correct parameter to Google Fonts for your WordPress site.
For Developers: Likely you’re using Google Fonts which is quite simple to resolve this finding. All you have to do is add the “&display=swap”query string to your Google Font URL; more details from Google.
Avoid Multiple Page Redirects
If your site has a lot of redirects these will slowly increase page load speed. For example if your homepage / goes to /home.html this will cause a delay in response to your users. You may see this error if you have CSS or JS files that lead to a redirect as well.