Support » Plugin: Smart Cookie Kit » Is it compatible with Autoptimize?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author shark986

    (@shark986)

    Hello @stepunk,
    I noticed that the Javascript optimization of Autoptimize breaks things. This is because it changes order and position of javascripts files and scripts. IMHO, that kind of optimization could breake “javascript things” even without my plugin…

    nah .. 🙂

    if anything breaks (and that *can* happen) then some autoptimize (re-)configuration can fix this. there’s more info in the troubleshooting tips and info on exclusions in the AO FAQ.

    @shark986; given the more then 600 000 active installs of AO, it might be worth your while to investigate how to make it work either by instructing your users, by changing your code or by using AO’s API to treat your code differently. I’ll be happy to assist if need be 🙂

    hope this helps,
    frank (ao dev)

    Hi,

    To solve this isse just add /wp-content/plugins/smart-cookie-kit/js/sck.min_2018060101.js to the JS list of files to exclude in Autoptimize setting.

    The only setback would be that I assume the filename changes when Smart Cookie Kit is updated. Perhaps the plugin author @shark986 can change it so the JS and minified JS filenames do not change with an update.

    Best regards,
    Dennis

    Great info @capocards, thanks for sharing! fyi; you can also exclude with /wp-content/plugins/smart-cookie-kit/js/sck.min or /wp-content/plugins/smart-cookie-kit/js/ or just smart-cookie-kit/js/ and the date in the filename would not matter any more 🙂

    hope this helps,
    frank (ao dev)

    Plugin Author shark986

    (@shark986)

    @stepunk @capocards
    I just released an update. You can remove the exclusion from the Autoptimize settings.

    @capocards your assumption is correct. The resource name will change every time it will be necessary to make sure that browsers will download that resource when necessary.

    @optimizingmatters this is why I said that AO breaks things, if I enable “optimize js” and “aggregate inline scripts” and exclude smart cookie kit script, the result is that the “localized” options of the plugin are inserted AFTER the script inclusion.. And things are broken! So, please, do not come here saying “nah, our plugin has 600 000 active installs – it is a your problem”.

    Now I have used the API to exclude necessary resources and completely disable the inline aggregation, but I think this behaviour could be improved.

    Thanks for your support.

    Sorry if my feedback seemed harsh my friend, I was not saying it was your problem but -as proven by your example- that it’s a matter of configuration (e.g. “aggregate inline JS” is off by default). anyway, great job! 🙂

    have a nice day! 🙂
    frank

    I would like to add to this discussion, that as well as excluding Smart Cookie Kit scripts from Autoptimize (I still had to do it despite the update), you also need to do the same for Async Javascript, in case you are using both plugins.

    Until I did that the Cookie alert would not even show up.

    Thanks for this amazing plugin, by the way. I am using it on almost all my websites 🙂

    Cristina

    Plugin Author shark986

    (@shark986)

    Hi @critara,
    could you share with me your Autoptimize version and configuration, please?

    Thanks to you, for your feedback 🙂

    Nicola

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Is it compatible with Autoptimize?’ is closed to new replies.