Apr 062018
 

WordPress Speed Booster Pack Advanced Settings post shows you how to exclude script handle from being moved to the footer and more.

Last Updated: February 20, 2020

Latest News: Updated the documentation.

There are times that your site might not like moving certain scripts to the footer. In this post you will learn how to exclude script handle from being moved to the footer and script files from being deferred. This is important if your site has scripts that don’t like to be moved to the footer because it causes errors in the site.

Note: Read the warning in red carefully before you go ahead and start enabling these features without a backup plan in place.

What you need:

Speed Booster Pack Tutorials

WordPress Speed Booster Pack Advanced Settings

Step 1 ) The following image Advanced tab allows you to enable the following options.

Advanced Optimizations Settings

  • Optimize Google Fonts
  • (BETA) Enable lazy loader
  • Enable instant.page = Click the following link instant.page to learn more about this feature.
  • WooCommerce: Disable cart fragments
  • (BETA) Remove WooCommerce scripts in non-WC pages
  • (BETA) WooCommerce: Disable password strength meter
  • Remove Google Maps
  • Remove REST API Links
  • Remove all RSS feed links
  • Minify HTML

wp-speed-booster-pack-advanced-settings-new

JavaScript Optimization

Step 2 ) The following image JavaScript Optimization allows you to enable the following option.

Note: Make sure you read the note in the red box before you enable this feature.

JavaScript Optimization Settings

  • Move scripts to footer

wp-speed-booster-pack-javascript-optimization-new

Exclude scripts from being moved to the footer

Step 3 ) The following image allows you to Exclude scripts from being moved to the footer by adding an exclusion rule per line.

wordpress-speed-booster-pack-exclude-script-moving-footer

Exclude scripts from being deferred

Step 4 ) Coming back soon! 

Note: This feature was removed in version 3.8.5. The developers are rewriting this feature from scratch to improve its functionality.

CSS Optimization

Step 5 ) The following image CSS Optimization allows you to enable the following options.

CSS Optimization Settings

  • Inline all CSS
  • Minify all (previously) inlined CSS
  • Move all inlined CSS into the footer

Exclude CSS

Step 6 ) The following image Exclude CSS allows you to excludes styles from being inlined and/ or minified. Enter one per line, the handles of CSS or the final part of the style URL. Click on Save Changes button when you finish setting up the advanced options.

Troubleshooting Tips

Q1 My slider stopped working = In the old version, I couldn’t move scripts to the footer because it broke the slider – images never loaded – even with scripts excluded. After the upgrade, I have to switch off “Defer parsing of javascript files” for the slider to work.

Solution 1: Defer parsing of javascript files doesn’t make sense/shouldn’t be used in combination with “move scripts to footer”.

If you move all the scripts to the footer, deferring doesn’t have much effect (if any), since the DOM is already pretty much all loaded and there’s no more render blocking resources being loaded.

What I’m basically trying to say is that they should be mutually exclusive and use one or the other.

Also, if defer parsing of javascript files is breaking your slider, try excluding the file that you believe is the culprit. Add this file to the following field under “Exclude scripts from being deferred”. (Solution provided by @machothemes)

=======================================

That is all you need to do to exclude scripts from being moved to the footer and from being deferred.

Note: Take care when adding scripts in the fields above. If you enter the wrong script file or handle it can cause errors. 

Click on the following URL WordPress Speed Booster Pack Optimize Site Steps to learn more.

I will be updating this tutorial from time to time. Make sure you come back for the latest updates.

If you have any questions please let me know.

Enjoy.

I have been working in IT since 1999 and I enjoy the challenges it brings me. I love developing websites with WordPress. I spend a lot of time helping out in wordpress.org forums. I have been writing tutorials since 2011. Now I am learning how to manage my own VPS "Virtual Private Server.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)