• Wordpress 4.9.2
    WooCommerce 3.2.6
    Flatsome Theme 3.4.3
    FooBox 2.4.0.0
    FooGallery 1.4.15
    Wp-Rocket 2.1.1.5
    Wp-Rocket Footer “Derrick Hammer” 3.0.5

    I noticed while trying to exclude ‘/wp-content/plugins/fooboxV2/js/foobox.min.js’ within wp-rocket helper plugin–>(wp-rocket-static-exclude-defer-js.php), it seems that your plugin will not respect the exclusion.

    Currently while wp-rocket–>(optimize CSS Delivery) is ticked off to auto generate critical css, foobox will cause FOUC. When foobox is off, then no issue with your plugin enabled or FOUC. By default, FooBox does not support the loading of its scripts using either the defer or async attributes. FooBox relies on both inline scripts and has a dependency on jQuery and so can not make use of these attributes. Foobox does offer a setting to load it’s js files in the footer.

    My thinking is, your plugin forces foobox to listen regardless. If I can exclude the foobox js from your plugin, then perhaps it won’t cause the FOUC. For me to do that, I’d need your plugin to respect the wp-rocket helper plugin to exclude defer js specified files. Anyway you can add this to the plugin?

    Note: I verified by page source that when your plugin was activated it grabs the foobox.min.js file also. Turn it off, then it’s respected by wp-rocket. However, with your plugin deactivated, I still get the same FOCU when foobox.min.js is excluded and auto critical css is activated? It’s only when your plugin is activated and auto criticall css is activated and Foobox is deactivated all works great. Just would like to use Foobox. I even use Plugin Organizer to only use Foobox where needed. Tried to re-order Foobox to only run when all is loaded without luck.

    I might be totally off base, but it’s my last option to try. I really don’t have any other ideas to try besides letting Foobox have it’s way? Might not be anything within your plugin that will prevent this, but thought I’d ask. I might learn something!

    Kind Regards,

    Stu

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Respect – wp-rocket-static-exclude-defer-js.php’ is closed to new replies.