+91 88 00 563434 [email protected] Blog open-book Knowledge Base

Find Solutions in Our Knowledge Base

How to Fix Render-Blocking JavaScript and CSS in WordPress

You are here:
Sharing is Caring

WordPress is an open source website creation tool written in PHP. Every WordPress website includes a theme and plugins that add JavaScript and CSS files to the front-end of the website. These scripts have the potential to improve website performance, but they can also hinder page rendering. Web browsers have to load these scripts and CSS before loading the rest of the page content. To optimize your website’s page load time and comply with Google’s speed and performance guidelines, you can check your website’s Google PageSpeed Score, which provides recommendations for improvement.

Blocking javascript and css

Let’s now explore how to resolve this performance issue for WordPress websites.

You can optimize your website by removing these JavaScript and CSS files using a WordPress plugin called “Autoptimize.” Install the plugin through your WordPress admin dashboard and, once activated, navigate to the “Settings >> Autoptimize” page to configure its settings for your WordPress site.

Blocking javascript and css

Check the box next to the JavaScript and CSS options as shown above, and then click on the “Save Changes” button.

After making these adjustments, run the Google PageSpeed tool on your website again, and you will see a performance improvement. If the test results still indicate render-blocking scripts, return to the plugin’s settings page and select the “Show Advanced Settings” button at the top.

Blocking javascript and css

In these Advanced settings, you can enable the plugin to include Inline JavaScript and remove any scripts that are excluded by default, such as jquery.js or seal.js, etc.

Scroll down to the CSS option and allow the plugin to optimize the inline CSS by checking the corresponding box. Then click on “Save Changes and Empty Cache.” Once you have completed these steps, test your website using the Google PageSpeed tool. It’s important to thoroughly check your website to ensure that optimizing the JavaScript and CSS hasn’t caused any issues on the web page.

If you need further assistance, please reach out to our support department.


Sharing is Caring

Leave a Comment

Table of Contents