fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

CSS Files loading on all Pages

Tiago Almeida

Hi, i have 23 active plug-ins including “Variation Swatches” and “Additional Variation Images Gallery”. If i visit a page on my site like the “Contacts” page i can see that my theme loads three CSS files, which is a lot but compreensible because the are a lot of elements to style, its the theme. No other plug-in loads CSS files beside your two plug-ins that load a total of  7 stylesheets. This is crazy, even for the pages where it should load the CSS files. Here is a list:

woo-variation-swatches/assets/css/frontend.min.css
woo-variation-swatches/assets/css/wvs-theme-override.min.css
woo-variation-swatches-pro/assets/css/frontend-pro.min.css
woo-variation-swatches-pro/assets/css/wvs-pro-theme-override.min.css
woo-variation-gallery/assets/css/slick.min.css
woo-variation-gallery/assets/css/frontend.min.css
woo-variation-gallery/assets/css/theme-support.min.css

Worse, there are an additional 5 JS files that are loaded:

woo-variation-swatches/assets/js/frontend.min.js
woo-variation-swatches-pro/assets/js/frontend-pro.min.js
woo-variation-swatches-pro/assets/js/add-to-cart-variation.min.js
woo-variation-gallery/assets/js/slick.min.js
woo-variation-gallery/assets/js/frontend.min.js

Could you please dequeue this files from pages where they are not needed? People only use them in Product pages or in the catalog if the theme has “Quick View” (or if they have any of the plug-ins option for the catalog). Also, any chance of merging some of these files so the pages that need them can save on requests?

Thanks. We like the options of your plug-ins but they are infamous when it comes to performance, the performance hit of “Additional Variation Images Gallery” is the biggest one of our plug-ins, just to show some more images.

Ahmed Ehsaan

Hi Tiago,

Could you check this link: https://wordpress.org/support/topic/what-does-load-scripts-globally-mean/

Thank You