Okay
  Public Ticket #1370597
Combine JS & CSS
Closed

Comments

  • 3rd-Eye started the conversation

    Hello,

    I am using the Neighborhood wordpress theme available on Themeforest and your Layerslider plugin instead of Revolution Slider.  I've been having a lot of trouble implementing any plugin to combine and minify JS using Layerslider WP.  Do you have any recommendation or speed optimization plugin that has worked with Layerslider?

    I've tried W3 Total Cache and Autoptimize among a few other popular plugins, also tried Cloudflare but of course Rocketloader breaks the slider as well.  I see instances where more Layerslider's .js files are being loaded twice as well and I'm concerned it's top-heavy and may need to go with the slider the theme developer uses instead..  But I do like Layerslider WP alot and am willing to try your advice.

  • [deleted] replied

    Hello 3rd-Eye,

    Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today. I appreciate your patience while we've been working towards your ticket.

    Plugins or scripts that are interfering with the plugin files by compressing or merging them will likely cause some problems unfortunately. I will ask the dev team whether they have any recommendations.

    You could also try to use the 'Conditional script loading' and 'Include scripts in the footer' options for better performance, located in the 'Advanced' settings on the main page of the admin area.

  • [deleted] replied

    Hello again,

    The JavaScript files are minified by default, and by using the mentioned Conditional script loading option, they will only be loaded when necessary. The same files shouldn't be loaded multiple times, however certain extras like the Popup feature are located in a different/separate file, but these are also only loaded when necessary. So the most of what you're looking is already there and working.

    As mentioned the combine function might be problematic. Regardless, LayerSlider should be working with W3 Total Cache and other popular cache plugins, we did not receive any compatibility reports (other than Rocketscript). It could happen that the cache plugin do not see some files that are in a different location (Origami, Popups) and loaded conditionally. But WordPress offers opportunities to handle cases like this, so it only depends on the cache plugin how it implements itself.

    The CSS file is always loaded at the moment, we are planning to change this in the future.