🔥 🥳 Get your Wordpress Pagespeed optimized today for $99 🔥 🥳 Conditions apply.

Asset Cleanup: Review and tutorial 2021

Last updated on October 18, 2021 | By

Asset Cleanup is a free plugin with a paid version that aims to help to remove unused css and unused js from your WordPress.

One of the main differences from using the delay javascript execution until user-interaction for solving “remove unused javascript”, is that this method will fully reduce HTTPS requests.

How to find unused javascript to remove with Asset Cleanup

To find unused Javascript to remove using Asset Cleanup, you will need to manually find which functions and features you want to remove from a page. It also needs testing, which can be done using “Test Mode“.

Here are some common examples of settings used in Asset Cleanup:

  • Remove ReCaptcha Javascript – Remove it everywhere, with an expection for the page you want to load; e.g. form page to avoid bots.
  • Remove Google Ads Javascript- Remove it everywhere, with an expection for ad pages.
  • Remove contact form Javascript – Remove it everywhere, with an expection for contact page.
  • Remove social sharing Javascript – Remove it everywhere, with an expection for posts pages and/or pages where you need it to load.

We can recommend an alternative way to remove unused javascript, which will be using the delay javascript execution until user-interaction, accomplishing one of the desired results:

How To Remove Unused Javascript In WordPress And Improve Pagespeed (2021)

How to remove unused CSS or JS using Asset Cleanup

After installing Asset Cleanup, you’re prompt with welcome messages guiding you through the plugin. You can use Asset Cleanup with a compatible cache plugin but avoid enabling overlapping features that may cause issues.

Go to the wordpress pages or posts tabs and you notice a new button “Manage CSS & JS”, click on it and a new page opens with the enqueued files from that specific page.

image 5
New button on the WordPress interface

To better assist you with removing your unwanted css or js, you can change the Assets List Layout to “grouped by size”, which will list assets by size.

image 4

Remove the unused CSS or JS enabling the “unload on this page” button. You can test any combination of removed assets using “Test Mode“.

Asset Cleanup Additional Features(Advanced)

Asset Cleanup has additional features for advanced users whiling to fine-tune their site with specific rules for removing unused CSS and JS.

It offers logic of removing css/js everywhere(all pages of the website), and removing on a specific post type, with both options able to add exceptions(where you want to keep loading it). Asset Cleanup has a note box where you can write down why you removed that asset from loading.

Asset Cleanup Test Mode

You can use Asset Cleanup “Test Mode“ feature to preview changes before they go to your live website. Enable the feature on Settings, after that, all changes will be only visible to admins that are logged in on WordPress.

Test your changes without interrupting your live website, approve them, and apply on the live website. You can also save the settings using Tools > Import/Export, in case you need more testing.

Asset Cleanup and Wp Rocket

Asset Cleanup and WP Rocket can be used together but don’t enable overlapping features to avoid issues.

Leave a Comment