ericchaffey Posted March 10, 2017 Share Posted March 10, 2017 Prestashop head includes are absolutely terrible. As far as I can tell every css and js file that might be used on a page somewhere is automatically loaded in every page of the site; totally ridiculous. I also see scripts that have nothing to do with the page automatically inserted into every page; even if they aren't being used anywhere on the site. I have 50 files automatically loaded on my homepage where I really only need 49 :wink: I know this is an old Prestashop issue and they supposedly fixed it in 1.7 to have a better MVC structure. Will future development of TB help streamline what files are loaded on each page based on requirements of the content and possibly provide a way to minify all files? Thanks! Link to comment Share on other sites More sharing options...
Traumflug Posted March 10, 2017 Share Posted March 10, 2017 PS 1.7 tackles this by joining all the CSS and JS snippets into one big file for each. Pretty simple to do, just use a master CSS/JS file containing nothing but @include's for the other files and use that. The webpack compiler even manages to optimize the result (options --optimize-minimize --optimize-occurence-order --optimize-dedupe). 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