• Have you guys ever thought about including your JS and CSS directly in the plugin instead of referencing external files. If you were to do that then plugins like Autoptimize https://www.ads-software.com/plugins/autoptimize/ would be able to optimize and compress your JS and CSS for optimum delivery.

    A second thought would also be to change this bit of code

    wp_enqueue_script(
        'juicerembed',
        '//assets.juicer.io/embed-no-jquery.js',
        array('jquery'),
        false,
        false
      );

    To enque your script down in the footer instead of in the header. This would prevent render blocking javascript from slowing down page speeds.

    Would it be possible to implement these changes??

    Thanks.

    https://www.ads-software.com/plugins/juicer/

Viewing 1 replies (of 1 total)
  • Plugin Author Juicer.io

    (@weckersham)

    These are both good thoughts. However, the problem with including the js and css files into the plugin itself means that users would need to upgrade the plugin every time we update those files (which is at least once a day). That would get annoying. Additionally, we already compress and optimize the files ourselves.

    Additionally we have the js embed code the way it is because we’ve found if there is a javascript or a jquery error earlier on the page that it will prevent Juicer from loading entirely. We haven’t come up with a good way to fix this yet, but it would be preferable to load this last.

Viewing 1 replies (of 1 total)
  • The topic ‘Include JS/CSS Files’ is closed to new replies.