Added assets cleanup optimization script#13
Conversation
aritzolaba
commented
Mar 13, 2017
- Removes unused jQuery migrate
- Removes unused sitepress.js when WPML is enabled
- Removes language selector css when WPML is enabled
|
@aritzolaba Why would we want to remove this scripts?? They are never necessary? |
|
Firstly, let's see what jQuery Migrate does: So we can assume it is safe not to include it if your project additional libs and jQuery related tools work ok with the jQuery version you are using. It's one request less. For sitepress.js and the language-selector.css, they can be removed if you are including a custom language selector where you have already coded the selector itself and applied styles. If those 2 scenarios are met (90% of the projects I believe) we can apply these optimizations that lead to 3 http requests less to make and a lighter website. |