• Resolved danbailan

    (@danbailan)


    Hi,

    Am currently using AO on my dev site before moving it across to the main site. It runs alongside wp-super cache and am liking it very much, but am struggling with an exclusion.

    I have tried every which way to get the lightbox effect, fancybox (nextgen gallery) to work by adding exclusions as per your notes, Frank and these are the js I have tried, comma separated.

    jquery.easing-1.3.pack.js
    jquery.fancybox-1.3.4.pack.js
    nextgen_fancybox_init.js

    but no can do. I have also been in the header and copied out all sorts of other nextgen js found there and added that to the exclusions but that too did not work.

    The only way I can get it to work is by using force into head with look for scripts in head and not using catch wrapping. Catch wrapping on its own had no effect and if enabled alongside these other two caused the fancybox again not to work.

    Aggregated scripts also has to be unchecked.

    Otherwise, I have these boxes checked, html (both boxes) and css, optimize with not outside head enabled and an exclusion for my style.css

    I am worried about performance so would rather not force js (everything) into the head. Am I missing something?

    Many thanks for your help

    dan

    https://wordpress.org/plugins/autoptimize/

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

    (@futtta)

    well, when excluding a jquery plugin, you have to also exclude jquery itself. did you try that?

    Thread Starter danbailan

    (@danbailan)

    Many thanks for coming back to me so quickly,

    I did try that originally on its own and then added it to the list as well, but again, no luck.

    It will only work with force into head/look for scripts in head checked, not by adding exclusions?

    I’m sure it is not vital but a puzzle!

    Plugin Author Frank Goossens

    (@futtta)

    Always better not to force in head and not to look only in head. What plugin(s) should I install if I’d want to try this myself?

    frank

    Thread Starter danbailan

    (@danbailan)

    I am using the nextgen gallery plugin, with fancybox as its light box effect – found in other options.

    I have played around more and it seems that as long as force into head is enabled, it will work. Other options are not necessary (i.e. look only in head), though I was enabling this for reasons of the cache maybe getting too big…

    many thanks for maybe looking into this.

    Plugin Author Frank Goossens

    (@futtta)

    Had a quick go at this yesterday, but it seems you will indeed have to “force into head” to have this work danbailan. Although from a performance point of view it is better to have JS at the end (and deferred), some JavaScript simply has to be loaded early in order for it to work correctly.

    Thread Starter danbailan

    (@danbailan)

    Many thanks for confirming this.

    I have tried every which way to get this working too, but now I know I have not missing something. I am sure that in researching things I saw somewhere that lightbox type effects will only work in the head…

    When you say performance wise, do you mean it will cause a noticeable lag on loading (uncached) pages?

    Am I still getting performance improvements (for sure removal of blocking etc in pagespeed) by using js in the head or am I in reality slowing my whole site down?

    dan

    Plugin Author Frank Goossens

    (@futtta)

    You’re still getting performance improvements, as all JS is aggregated & minimized, but that optimized JS however, will be blocking as it is in head and as it cannot be deferred.

    frank

    above hints didn’t work for me. with wp 3.8, autoptimize 1.8.5 and nextgen 2.0.66.27 the following settings help:
    – optimize html
    – keep html comments
    – optimize js
    – force js head

    great plugin, frank!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fancybox with Nextgen Gallery exclusion js’ is closed to new replies.