We want to find out exactly how this feature helps enhance page load times so we have set up two websites, a control website and an experimental website.
+14 Points
In this test, using the Delay Scripts feature alone added +14 points for a 26% increase on mobile devices to the Google PageSpeed Performance score! Read the documentation to learn how to use the Delay Scripts tool.
For our control website, we created a brand new WordPress installation. For this experiment we’re using the Twenty Twenty-Four WordPress theme, a live chat plugin, and three active code snippets that pull in a weather widget, custom chart and a Google Calendar.
The purpose of adding these plugins and snippets is to generate different JS files on the site. This will help us test the “Delay Scripts” tool when we set up our “Experimental Website”.
A strategic deferral of non-essential scripts helps improve Google PageSpeed scores and creates a more responsive and user-friendly website. Delaying scripts can significantly enhance website performance by optimizing load times and reducing the initial burden on the main thread. For the experiment we chose to delay following scripts because of their commonality and the fact that none are essential immediately upon page load:
Live Chat – We chose the live chat script from livechatinc.com because it’s not essential immediately upon page load. Users don’t typically need access to the chat widget the moment they land on the page, so delaying its load allows the main content to appear faster, improving the initial user experience.
Weather Widget – Similarly, the weather widget script from weatherwidget.io is not a critical part of the page’s core functionality. Since this information can be loaded a few seconds after the rest of the page, delaying the weather widget script ensures that essential content is prioritized, further enhancing load times and overall site performance.
Google Calendar Script – We chose the Google Calendar script because although it may be essential for displaying upcoming events or schedules, but its immediate presence upon page load is not critical.
Custom Chart Script – the custom chart script, while providing valuable data visualization, can be deferred to prioritize the loading of essential content.
By delaying these scripts, we optimize load times and ensure a smoother user experience, particularly during the critical moments of initial page load.
62% Decrease
In this test, the Delay Scripts feature displayed a 62% decrease in Time Third-Party Code Blocked The Main Thread For on mobile screens and 37.5% on larger screens in the Google PageSpeed score results! Read the documentation to learn how to use the Delay Scripts tool.