Title: Jquery: render blocking error VS not defined
Last modified: May 22, 2019

---

# Jquery: render blocking error VS not defined

 *  Resolved [outcats85](https://wordpress.org/support/users/outcats85/)
 * (@outcats85)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/)
 * If I remove the jquery.js to the Exclude scripts from Autoptimize list, Jquery
   becomes a render blocking script.
    If I add it to the list I get rid of the error
   on Google but then I get this error on Chrome Console instead when loading the
   page: Uncaught ReferenceError: jQuery is not defined at Autoptimize_single_e4c886b4345291d5682832373e8c720a.
   js?ver=1.0.0:1
 * Any way to remove both errors?
    I also have the “Aggregate all linked JS-files
   to have them loaded non-render blocking? If this option is off, the individual
   JS-files will remain in place but will be minified” and ” Let Autoptimize also
   extract JS from the HTML. Warning: this can make Autoptimize’s cache size grow
   quickly, so only enable this if you know what you’re doing” enabled.
 * Thanks.
 * By the way after the latest Google Speed Test update my score went down from 
   90/100 to 35/100. Freaking unbelievable. It says that it takes up to 10 seconds(
   sometimes) to load the page when actually in Pingdom it takes about 100ms.
    -  This topic was modified 7 years, 1 month ago by [outcats85](https://wordpress.org/support/users/outcats85/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjquery-render-blocking-error-vs-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11558133)
 * The best solution is to move away from plugins that require jQuery early (I think
   in your case it’s wpvr).
 * Other then that you could try [the code snippet at in this blogpost](https://blog.futtta.be/2018/12/13/how-to-fix-render-blocking-jquery-js-in-autoptimize/),
   but that’s not a guaranteed working fix for all possible cases.
 * hope this helps,
    frank
 *  Thread Starter [outcats85](https://wordpress.org/support/users/outcats85/)
 * (@outcats85)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11558426)
 * Thanks. Should I just copy the code like that in the function.php file without
   editing anything?
    Disabling the plugin did work. Trying to find a solution to
   keep the plugin active though.
    -  This reply was modified 7 years, 1 month ago by [outcats85](https://wordpress.org/support/users/outcats85/).
    -  This reply was modified 7 years, 1 month ago by [outcats85](https://wordpress.org/support/users/outcats85/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11558457)
 * You _could_ add it to functions.php, but the safer solution could be to use [the code snippets plugin](https://wordpress.org/plugins/code-snippets/)
   to do so? 🙂
 *  Thread Starter [outcats85](https://wordpress.org/support/users/outcats85/)
 * (@outcats85)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11558948)
 * Thanks. No need to edit anything in the code you provided, correct?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11559386)
 * you don’t have to copy the opening `<?php` tag, but no need for any other changes
   no.
 *  Thread Starter [outcats85](https://wordpress.org/support/users/outcats85/)
 * (@outcats85)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11559425)
 * Thanks. Will do.

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

The topic ‘Jquery: render blocking error VS not defined’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [outcats85](https://wordpress.org/support/users/outcats85/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/jquery-render-blocking-error-vs-not-defined/#post-11559425)
 * Status: resolved