Title: Can&#8217;t Defer JS
Last modified: December 30, 2018

---

# Can’t Defer JS

 *  [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/)
 * Hi,
 * I am trying to defer parsing of a JS script based on Google’s recommendation 
   and the plugin is not doing anything. I have tried several settings, but the 
   last ones are:
 * Enable Async JavaScript? > Checked
    Also enable Async JavaScript for logged in
   users? > Checked Also enable Async JavaScript on cart/ checkout pages? > Checked
   Async JavaScript Method > Defer jQuery > Defer Scripts to Defer > [https://www.carlosazuaje.com/wp-content/cache/minify/ad843.js](https://www.carlosazuaje.com/wp-content/cache/minify/ad843.js)
 * I am still getting the same message on Google’s PageSpeed Insights and also on
   GTmetrix.

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038326)
 * That’s because AsyncJS adds defer (or async) to JS that was added to wordpress
   using wp_enqueue_script Carlos, but you have another plugin that is minifying
   that enqueued JS and AsyncJS does not “see” that. So if you want to use asyncJS
   to async your JS, you will have to disable JS minification (or use anohter minifier).
 * hope this clarifies,
    frank
 *  Thread Starter [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038340)
 * Hey Frank,
 * Thanks for the fast response. What do you recommend then to minify all my JS 
   but also defer the script? Obviously, I don’t want to only defer the script and
   not be able to minify the rest of my JS.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038342)
 * I might be am biased, but if I were you I would give Autoptimize a try 😉
 *  Thread Starter [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038346)
 * I actually gave it a try a while ago but had to deactivate it because it gave
   me problems.
 * So in summary, AsyncJS won’t work if I have another plugin that is not Autoptimize
   minifying my JS, right?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038373)
 * depends on how the minifying plugin works actually, if it only replaces the script
   source but leaves the rest of the script tag (including the async or defer flag)
   intact, then you’re good to go. apperantly the one you’re using now (which one
   is that) works differently.
 * regarding AO; don’t know when you tried and what the issue was, but AO now also
   has an option not to aggregate (which means it acts more or less how your current
   minifier works). and well, almost all problems can be fixed by [some troubleshooting](https://wordpress.org/plugins/autoptimize/#configuring%20%26%20troubleshooting%20autoptimize)
   😉
 *  Thread Starter [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038404)
 * Thank you.
 * I am using W3 Total Cache, which minifies HTML, CSS and JS (same as Autoptimize).
   I understand that running the two plugins together causes problems, that’s why
   I only have W3 Total Cache activated.
 * If I understand you correctly, are you saying that I can run Autoptimize together
   with W3 Total Cache and make AsyncJS work?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038419)
 * > If I understand you correctly, are you saying that I can run Autoptimize together
   > with W3 Total Cache and make AsyncJS work?
 * you can, if you disable all minification in W3TC to avoid conclicts.
 *  Thread Starter [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038423)
 * Is that the only way to make AsyncJS work?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038441)
 * well, you could try finding another minification plugin, but I don’t know how
   the others work tbh, so can’t say for sure. it is possible fast velocity minify(
   which is great) can help and maybe that even has asyncing in it.
 *  Thread Starter [Carlos Azuaje](https://wordpress.org/support/users/carlosazuaje/)
 * (@carlosazuaje)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038473)
 * Thank you for your support.
 * Have a great coming year! 🙂
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038489)
 * you’re welcome Carlos, happy new year! 🙂

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

The topic ‘Can’t Defer JS’ is closed to new replies.

 * ![](https://ps.w.org/async-javascript/assets/icon-128x128.png?rev=1839260)
 * [Async JavaScript](https://wordpress.org/plugins/async-javascript/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/async-javascript/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/async-javascript/)
 * [Active Topics](https://wordpress.org/support/plugin/async-javascript/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/async-javascript/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/async-javascript/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/cant-defer-js/#post-11038489)
 * Status: not resolved