Eliminate jquery.js render blocking

During load time and Google PageSpeed Score optimization, the following problem occurs from time to time:

The file “jquery.js” blocks the rendering of the page

All other scripts are usually already loaded asynchronously using the defer or async attribute or are only called in the footer, so that asynchronous reloading is not necessary.

However, the jQuery script usually has to be loaded before all other scripts and so it is often located in the website header and then blocks the rendering of the page as a result.

The solution/procedure in general

1) Summary and compression of all JS files and inline scripts in one or a few files.

2) Call up the summarized file in the footer of the website. Additionally: Use of defer or async attribute in the script tag.

3) Positioning of the jQuery script at the top of the summarized, compressed jQuery file. This means that all other scripts are loaded later.

The solution specifically for WordPress

If WordPress is used as a CMS, you can use the Autoptimize plugin to compress and combine the JS files, for example.

Before activating the summary, it is important to check in the Autoptimize settings that the jQuery script not in the exclusion list of the files not to be optimized and that the script is located in the source code before optimization using Autoptimize is referenced as the first scriptbecause Autoptimize combines the scripts in the order in which they are called in the code before optimization (without the Autoptimize plugin).

Picture of Christian Schreiber
Christian Schreiber
I have been working as an SEO consultant with a technical focus since 2009. As a qualified business IT specialist and web developer, I support marketing specialists and programmers from start-ups, medium-sized companies, corporations and agencies in the implementation of load time optimisation for high-performance websites.

Performance improvement for cookie hints

Unfortunately, the mandatory cookie notices often have a negative impact on website performance and user experience. This is particularly evident in the Google PageSpeed analysis.