Title: Uncaught Reference Error
Last modified: July 8, 2020

---

# Uncaught Reference Error

 *  Resolved [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/)
 * Hello!
    I have Optimize JavaScript Code checked, but Aggregate JS Files unchecked.
   I am receiving the following errors. Uncaught ReferenceError: jQuery is not defined
   at jquery-migrate.min.js:2
 * Uncaught ReferenceError: jQuery is not defined
    at jquery-ui.min.js:14
 * Uncaught ReferenceError: jQuery is not defined
    at autoptimize_single_f883f55850533be9166b11cf241de0a9.
   js:1
 * Uncaught ReferenceError: jQuery is not defined
    at autoptimize_single_309e1a27ab5c8722dea8f46fc8c384d5.
   js:20
 * Could you please suggest a fix for this.
 * Thanks for your time!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-reference-error-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13098405)
 * just tested in Firefox & Chrome and don’t see such error hsrothbard, so maybe
   you fixed it already?
 * frank
 *  Thread Starter [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13101192)
 * Hello Frank!
 * Yes.. it is fixed. I went to sleep and when I tested again, the error no longer
   appeared. I wish ALL my issues were that easy to solve!!
 * I have an idea it was from me experimenting. I know I am not tapping into the
   full potential of Autoptimize.When I enable aggregate js files, it breaks my 
   menu and actually slows down the site. So I am trying to tap into the async option.
 * Lighthouse testing results to eliminate render blocking resources-
    //ajax.googleapis.
   com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js
 * //www.wallpapergeeks.com/wp-includes/js/jquery/jquery-migrate.min.js
 * //www.wallpapergeeks.com/wp-includes/js/jquery/jquery.js
 * //www.wallpapergeeks.com/wp-content/cache/autoptimize/css/autoptimize_7b3695e98283d84e6e4cdd25ca325681.
   css
 * wp-content/cache/autoptimize/js/autoptimize_single_f883f55850533be9166b11cf241de0a9.
   js
 * I wish I was more knowledgable, but I am learning. I am leery to keep testing
   as not to encounter another problem. Any and all suggestions are so welcomed.
 * Thanks again….
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13101494)
 * you should _probably_ be able to async jquery-ui, jquery-migrate and the autoptimize_single
   one. jquery can rarely be asynced really.
 * for the CSS you can try the “inline & defer CSS”-option, there’s more info in
   [the AO FAQ](https://wordpress.org/plugins/autoptimize/#faq).
 * frank
 *  Thread Starter [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13102699)
 * That’s what I call excellent support!! Thanks for your quick response and suggestion.
   Autoptimize has now proven it’s worth. I have made strides in lighthouse and 
   GTmetrix but have more to go.
 * I get more ideas from GTMetrix to defer.Can I async as much as possible or is
   this counterproductive? Some results below-
    wp-includes/js/wp-embed.min.js wp-
   content/themes/PixatoLight/assets/javascripts/adapt.min.js
 * Do you have any recommendation to optimize .jquery?
 * I have been testing inline & defer CSS. I generated critical path CSS. Do I use
   the minified or unminified, or the minified or unminified combined?
 * Truly appreciate your support-
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13103332)
 * you can async as much as you want, only limitation things might break, so always
   test.
 * re. jquery; you’ll probably have to leave that be.
 * re. critical CSS; have a look at [https://www.youtube.com/watch?v=k56E_7SFQoE](https://www.youtube.com/watch?v=k56E_7SFQoE)(
   not my video) 🙂
 *  Thread Starter [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13106217)
 * I don’t see the aggregated file in my code, just the individual style sheets.
   What am I missing?
 *  Thread Starter [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13106227)
 * Sorry,found it! I couldn’t see it is Safari, but found it in Chrome.
 *  Thread Starter [hsrothbard](https://wordpress.org/support/users/hsrothbard/)
 * (@hsrothbard)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13169629)
 * Hello!!
 * Inline and Defer CSS worked great. Thank you.
 * I have been testing different scenarios.
 * I have moved some CSS above JS. Strange, it helped with performance in lighthouse
   and CLS slightly, but hurt LCP.
    Should I generate new critical path CSS?
 * I removed Google Fonts instead of combining and preloading as there was a strange
   tick where the fonts went from thick to thin.Now they load bold.Is there a way
   to change that?
    Should I no longer prefetch fonts.googleapis.com or fonts.gstatic.
   com?
 * wp-content/cache/autoptimize/js/autoptimize_single_f883f55850533be9166b11cf241de0a9.
   js is not asynced even though it is listed. Am I doing something wrong?
 * There is an error when loading in lighthouse-
    GET [https://www.wallpaprgeeks.com/asset-manifest.joson](https://www.wallpaprgeeks.com/asset-manifest.joson)
   404 It goes away, but is this something I can/should fix?
 * I get a message to preload wp-content/themes/PixatoLight/assets/stylesheets/unsemantic-
   grid-tablet.css
    but when I do, I sometimes get a warning message loaded but 
   not used.
 * Thanks so much for all your support.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13169829)
 * > Should I generate new critical path CSS?
 * no
 * > Now they load bold.Is there a way to change that?
 * you’ll have to change the CSS somewhere .. :-/
 * > Should I no longer prefetch fonts.googleapis.com or fonts.gstatic.com?
 * indeed, not needed.
 * > wp-content/cache/autoptimize/js/autoptimize_single_f883f55850533be9166b11cf241de0a9.
   > js is not asynced even though it is listed. Am I doing something wrong?
 * that’s JS that is excluded from optimization, adding it to async does not work,
   you’ll have to add the original filename
 * > There is an error when loading in lighthouse-
   >  GET [https://www.wallpaprgeeks.com/asset-manifest.joson](https://www.wallpaprgeeks.com/asset-manifest.joson)
   > 404 It goes away, but is this something I can/should fix?
 * no idea what that is I’m afraid.
 * > I get a message to preload wp-content/themes/PixatoLight/assets/stylesheets/
   > unsemantic-grid-tablet.css
   >  but when I do, I sometimes get a warning message
   > loaded but not used.
 * I would simply ignore that 😉

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

The topic ‘Uncaught Reference Error’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/uncaught-reference-error-4/#post-13169829)
 * Status: resolved