Title: script exclusion
Last modified: February 15, 2021

---

# script exclusion

 *  Resolved [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/)
 * How can ask Autoptimize stay out of the way? I like Autoptimize but with new 
   test seem have problem with the eventbrite script that run in my eventmanger.
 * [https://www.eventbrite.nl/platform/docs/embedded-checkout](https://www.eventbrite.nl/platform/docs/embedded-checkout)
   
   Load the script local. Did also try external but pop nor the embed will work 
   when have autoptimize active. When I disabnle Autoptimize everthings works perfect.
 * But there must be work around??
 * Have these exclusions but would help with this version of AO.
    wp-includes/js/
   dist/, wp-includes/js/tinymce/, js/jquery/jquery.js/jquery-migrate.js,jquery.
   slim.min.js, /jquery/jquery.min.js, eb.widgets.js, eb_widgets.js
 * Have not tested this before in last past months afther had working setting back
   then.
 * Must be solution without getting rit of AO to make work togetter.
    -  This topic was modified 5 years, 3 months ago by [Edwin Bekedam](https://wordpress.org/support/users/frontiers/).
    -  This topic was modified 5 years, 3 months ago by [Edwin Bekedam](https://wordpress.org/support/users/frontiers/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fscript-exclusion%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14052922)
 * OK, some questions:
    * does eventbrite work when “optimize JS” is off? * does
   eventbrite work when “optimize JS” is on but “aggregate JS” is off? * when it
   breaks, what JS errors do you see in the browser console?
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053040)
 * * does eventbrite work when “optimize JS” is off? = YES
    * does eventbrite work
   when “optimize JS” is on but “aggregate JS” is off? = NO
 * * when it breaks, what JS errors do you see in the browser console? Dont show
   up, not even see broken version.
 * ?vhp_flush_do=all&_wpnonce=406d591cc5:336 Uncaught TypeError: Cannot read property‘
   createWidget’ of undefined
    at ?vhp_flush_do=all&_wpnonce=406d591cc5:336 (anonymous)
   @ ?vhp_flush_do=all&_wpnonce=406d591cc5:336 autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:2 JQMIGRATE: Migrate is installed, version 3.3.2 DevTools failed to load SourceMap:
   Could not load content for chrome-extension://gginmiamniniinhbipmknjiefidjlnob/
   include.postload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
   4autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 jQuery.Deferred exception:
   r is not a function TypeError: r is not a function at o ([https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360](https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360))
   undefined bI.Deferred.exceptionHook @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:1 o @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 setTimeout (async)(
   anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 p @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:1 fireWith @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 fire @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:1 p @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 fireWith @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:1 ready @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 setTimeout (async)(
   anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 (anonymous) @ 
   autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 (anonymous) @ autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.
   js:1 4autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1 jQuery.Deferred exception:
   r is not a function TypeError: r is not a function at o ([https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360](https://www.bekamhealing.com/wp-content/cache/autoptimize/js/autoptimize_1a01a25bb73ce08240fb9245b01ddcb9.js:1:31360))
   undefined
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053051)
 * * when it breaks, what JS errors do you see in the browser console? I myself 
   Can hardly understand what it says. But dont think this any relation to the error.
    -  This reply was modified 5 years, 3 months ago by [Edwin Bekedam](https://wordpress.org/support/users/frontiers/).
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053086)
 * [https://www.bekamhealing.com/events/test-event/](https://www.bekamhealing.com/events/test-event/)
 * Its just test and sure way to make this work. Becouse when disbale AO. that moment
   starts working so somewhere I have a conflict but debuglog and PHP error log 
   are clean without any notice.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053331)
 * Looks like you have that old “defer jQuery” code snippet running and I think 
   things will work when you disable that frontiers, can you do so?
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053377)
 * 1. That old “defer jQuery” have looked for that many times. Got that there since
   started this website. But that not thing that I can solve myself, since snippet
   never been fount.
 * 2. Event checkout will not depend on JQuery.
 * 3. Pretty sure that not error since I notice that error but its for me labeled
   as unsolved and not anything that did try made it better.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053409)
 * I’m 100% sure the problem is just that, let me explain;
 * When I disable AO (by adding `?ao_noptimize=1` to the URL), this is the linked
   JS-file that comes just before the inline eventbrite code which mentions `window.
   EBWidgets.createWidget`.
 * `<script src="https://www.bekamhealing.com/wp-content/themes/lodestar-wpcom/assets/
   js/eb.widgets.js"></script>`
 * But when AO is active, that becomes: `<script defer src="https://www.bekamhealing.
   com/wp-content/cache/autoptimize/js/autoptimize_single_9f2c732faa0af87c7512a2aed4861441.
   js"></script>`
 * The problem specifically is with the `defer`, which AO does not add by itself.
 * Now when looking for `defer` in the HTML source, I also see
    `<script>var aoDeferInlineJQuery
   =function(){` which is something that _used_ to be added by the Critical CSS 
   power-up (which as far as I can tell you are not using) or which could be added
   by something else somewhere somehow.
 * So the only solution I can give you is; look where that deferring-code is added
   and stop that form happening frontiers.
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053415)
 * Thanks that helpfull look in to!
 * I searche for that issue
 *  Thread Starter [Edwin Bekedam](https://wordpress.org/support/users/frontiers/)
 * (@frontiers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053535)
 * I now understand defer refrence also.
 * Its solved! Thanks!!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053717)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * groeten uit België,
    frank

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

The topic ‘script exclusion’ 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/)

 * 10 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/script-exclusion/#post-14053717)
 * Status: resolved