vcopleutre Posted February 16, 2018 Share Posted February 16, 2018 Hi everyone, In order to increase the loading time on my site I want to delay some CSS/JS calls to improve my critical path. To limit the parallel downloads, my CCC is activated. My question is : How to exclude some CSS and JS files from being included in CCC ? I'd like to have on constant CCC file (which includes like global.css, product_files.css, etc... main css files) and other CSS files which would be called depends on the page. It would greatly increase the rendering speed of my site. Any ideas ? thx Link to comment Share on other sites More sharing options...
Prestachio Posted January 16 Share Posted January 16 Yes, that I also would like to know.. Anyone? Link to comment Share on other sites More sharing options...
ps8modules Posted January 17 Share Posted January 17 (edited) Hi. This can be achieved by overriding FrontController.php In the script you will find the call to custom.css Here you can add a condition so that the CSS is loaded only on a specific controller. For example: if ($this->context->controller->php_self == 'product') {your css} You can do the same for JS. Edited January 17 by ps8modules (see edit history) 1 Link to comment Share on other sites More sharing options...
Prestachio Posted January 19 Share Posted January 19 Great, thanks, that helped! 1 Link to comment Share on other sites More sharing options...
ps8modules Posted January 19 Share Posted January 19 I was happy to help 😉 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now