• When you’re using a plugin to optimise performance, with the option to aggregate JS files, the slider breaks.

    In stead of a slider you will have just a list of events.

    This happens in the Autoptimize plugin, if you uncheck the “Aggregate JS-Files” option, everything works find again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Excluding just the right files (maybe try adding plugins/stonehenge-em-slider/ to the comma-separated JS optimization exclusion list) might help too.

    Thread Starter rmz65

    (@rmz65)

    Thanks for the info.

    This actually does not resolve the problem, however the other option “Add try-catch wrapping?” does work.
    I don’t know if it has a big impact on performance, I guess so otherwise this would be ticked by default?

    it is better off really. you will probably need to exclude other JS from being optimized, look at the browser console for JS errors to get an idea of what is breaking exactly?

    Thread Starter rmz65

    (@rmz65)

    Okay, it’s resolved. This “Force JavaScript in <head>?” must be switched off.
    Without excluding the Slider js-file, or the or use “Add try-catch wrapping?”.
    I don’t remember if I enabled the “Force JavaScript…” or if this is selected by default, anyway it works fine now 😉

    Thread Starter rmz65

    (@rmz65)

    Correction, this only resolves the issue when you’re logged in.
    I found that another plugin wp fastest cache was intervening. Which is weird, I’ve been using this one for some time without issues. Disabled it now, things work fine.
    Next step is to check the site speeds.

    Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    Hi @rmz65,

    To exclude EM Events Slider from AutOptimze, @optimizingmatters built-in a very useful filter. Paste this in your theme’s functions.php.

    function stonehenge_em_slider_exclude_from_autoptimize( $exclude ) {
    	return $exclude . ", wp-content/plugins/stonehenge-em-slider/";
    }
    add_filter('autoptimize_filter_js_exclude', 'stonehenge_em_slider_exclude_from_autoptimize', 11, 1);
    add_filter('autoptimize_filter_css_exclude', 'stonehenge_em_slider_exclude_from_autoptimize', 11, 1);

    I found that another plugin wp fastest cache was intervening. Which is weird

    If you do not manually refresh the cache after changing settings, a (most) caching plugin will keep showing its already cached front-end version, until its scheduled automated refresh.

    Let me know if the snippet solved your issue, please.

    “force JS in head” is off by default and is better off from a performance point of view. re. wp fastest cache; try keeping it, but purely for page caching (so all CSS/ JS options off, AO is doing those anyway)?

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

The topic ‘Careful with optimise plugins’ is closed to new replies.