Title: Cache Dynamic Loaded JavaScript setting causes formatting issue
Last modified: June 8, 2020

---

# Cache Dynamic Loaded JavaScript setting causes formatting issue

 *  Resolved [clearlogos](https://wordpress.org/support/users/clearlogos/)
 * (@clearlogos)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cache-dynamic-loaded-javascript-setting-causes-formatting-issue/)
 * Hi,
 * I’ve been using the Asset Cleanup plugin and it has helped me improve my pagespeed
   a great deal.
 * However, the ‘Cache Dynamic Loaded JavaScript’ setting seems to cause a formatting
   issue with my Elementor testimonials carousel on my homepage. This setting makes
   the testimonial carousel stop working and just shows a single testimonial with
   no arrows. This setting also drastically improves my mobile pagespeed so wondering
   if you could suggest a way I can still use the setting but without the formatting
   issues!
 * Thanks,
 * Stephen
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-dynamic-loaded-javascript-setting-causes-formatting-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cache-dynamic-loaded-javascript-setting-causes-formatting-issue/#post-13024784)
 * [@clearlogos](https://wordpress.org/support/users/clearlogos/) first, my sincere
   apologies for not getting back to you sooner!
 * > _I‘ve been using the Asset Cleanup plugin and it has helped me improve my pagespeed
   > a great deal._
 * That’s awesome to hear! I hope you’ll use the plugin in the long run!
 * > _However, the ‘Cache Dynamic Loaded JavaScript’ setting seems to cause a formatting
   > issue with my Elementor testimonials carousel on my homepage. This setting 
   > makes the testimonial carousel stop working and just shows a single testimonial
   > with no arrows. This setting also drastically improves my mobile pagespeed 
   > so wondering if you could suggest a way I can still use the setting but without
   > the formatting issues!_
 * After inspecting your homepage, I haven’t noticed any dynamically loaded JavaScript
   files as they are all static. if you’re saying the feature drastically improved
   the mobile page speed, then it should have (no doubt) boost considerably the 
   speed on desktop devices. Frankly, I believe the boost in page speed for the 
   mobile view was from a different option (e.g. you unloaded some CSS/JS that were
   render-blocking and took a long time to load).
 * Moreover, starting from version 1.3.6.5, the option “Cache Dynamic Loaded JavaScript”
   is deactivated by default as it caused issues with some themes/plugins (incompatibility).
   This is a feature that should only be enabled when it’s really necessary as, 
   fortunately, CSS/JavaScript is most of the time loaded statically (from existing
   files) which that’s how it should be, and not from URLs such as `/index.php?load_css
   =[unique_id_here]` as this type of requests cause (in most cases) the WordPress
   environment to load in order to fetch the needed CSS. Imagine having a high traffic
   website with a few of these requests. It would make the WP environment (including
   database connections) to load several times more per page load (not ideal at 
   all). That’s why the file is downloaded once, then it’s referenced from the caching
   directory as a static file, reducing the number of resources that are used.
 * So, please make a few tests by deactivating this “Cache Dynamic Loaded JavaScript”
   option and let me know if everything is working fine again.
 *  Thread Starter [clearlogos](https://wordpress.org/support/users/clearlogos/)
 * (@clearlogos)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cache-dynamic-loaded-javascript-setting-causes-formatting-issue/#post-13025353)
 * Thank you Gabe that is really useful.
    I wondered, and this is perhaps a bit 
   cheeky, but would you be able to help me understand how I could use the plugin
   to improve my mobile pagespeed score?
 * I’m really not all that happy with my pagespeed and particularly my largest contentful
   paint on mobiles. Would you be able to let me know what I’m doing wrong? This
   would help me a huge amount.
 * Many thanks in advance!
 * [https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.cleardesign.studio%2F&tab=mobile](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.cleardesign.studio%2F&tab=mobile)
 *  Plugin Author [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * (@gabelivan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cache-dynamic-loaded-javascript-setting-causes-formatting-issue/#post-13026666)
 * [@clearlogos](https://wordpress.org/support/users/clearlogos/) An analysis of
   the website is required in order to understand what settings should and shouldn’t
   be used. This is usually done via trial and error in “Test Mode”. You also use
   Autoptimize and my advice when you use Google PageSpeed is to append to the URL
   the query string /?ao_noptimize=1 which will load the page without Autoptimize
   triggering the combine CSS/JS. This way, the report would show you the list of
   assets individually (not just a big combined CSS file). The same thing applies
   to [https://www.cleardesign.studio/?wpacu_clean_load](https://www.cleardesign.studio/?wpacu_clean_load)
   which in fact should also deactivate Autoptimize.
 * One of the things I’ve noticed in the report for “Remove unused CSS” is the file
   [https://www.cleardesign.studio/wp-content/plugins/elementor/assets/lib/font-awesome/css/all.min.css](https://www.cleardesign.studio/wp-content/plugins/elementor/assets/lib/font-awesome/css/all.min.css)
   that has the same number of bytes for “Transfer Size” and “Potential Savings”,
   which suggests it’s very likely the file is not needed. Upon closer inspection,
   it looks like the following stylesheets are not needed:
 *     ```
       <link   rel='stylesheet' id='font-awesome-5-all-css'  href='https://www.cleardesign.studio/wp-content/plugins/elementor/assets/lib/font-awesome/css/all.min.css?ver=2.9.13' type='text/css' media='all' />
       <link   rel='stylesheet' id='font-awesome-4-shim-css'  href='https://www.cleardesign.studio/wp-content/plugins/elementor/assets/lib/font-awesome/css/v4-shims.min.css?ver=2.9.13' type='text/css' media='all' />
       ```
   
 * If you load the URL like [https://www.cleardesign.studio/?wpacu_unload_css=font-awesome-5-all%2Cfont-awesome-4-shim](https://www.cleardesign.studio/?wpacu_unload_css=font-awesome-5-all%2Cfont-awesome-4-shim)
   which deactivates these stylesheets on page load (for debugging purposes), you
   will notice the page looks the same, so you can go ahead and unload them.
 * As you can see, it’s a trial and error thing and I agree, some things are hard
   to understand, but it will come easier in time once you do it a few times, it’s
   well worth it. Here’s a post of how to use Coverage DevTools on how to find unused
   CSS: [https://assetcleanup.com/docs/how-to-check-if-gutenberg-blocks-css-file-is-needed-or-not/](https://assetcleanup.com/docs/how-to-check-if-gutenberg-blocks-css-file-is-needed-or-not/)
 * Please check the tutorials from “Getting Started” -> “Vide tutorials” (plugin’s
   menu from the sidebar) if you haven’t already. The most popular one is “Speed
   Up WordPress in 2019: How To Optimize Your Website & Make It Load Fast”
 * The plugin’s documentation can be found at [https://assetcleanup.com/docs/](https://assetcleanup.com/docs/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cache Dynamic Loaded JavaScript setting causes formatting issue’ is closed
to new replies.

 * ![](https://ps.w.org/wp-asset-clean-up/assets/icon-256x256.png?rev=1981952)
 * [Asset CleanUp: Page Speed Booster](https://wordpress.org/plugins/wp-asset-clean-up/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-asset-clean-up/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-asset-clean-up/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-asset-clean-up/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-asset-clean-up/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 3 replies
 * 2 participants
 * Last reply from: [Gabe Livan](https://wordpress.org/support/users/gabelivan/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/cache-dynamic-loaded-javascript-setting-causes-formatting-issue/#post-13026666)
 * Status: resolved