Themes that use variable number JS and CSS files
-
I’m using a theme right now (https://wordpress.org/themes/sento/) that only loads some JS/CSS files when it needs them.
Examples:
– On the homepage the JS/CSS for the slider are loaded but not on the other pages.
– On pages that have a sidebar a specific CSS is loaded but not on the other pages.This causes Autoptimize to create several JS/CSS files depending on what each page loads.
What would you do usually do on these cases?
– You let things as they are and the user will load different combined JS/CSS files depending on the current page being visited (smaller files but several need to be loaded)
or
– You make sure all the needed JS/CSS files are enqueued on every pages so that Autoptimize will create a unique JS and CSS file that is valid for all the website (bigger file but only needs to be loaded once)
- The topic ‘Themes that use variable number JS and CSS files’ is closed to new replies.