![]() See What Scripts are Getting Loaded on Our Site How to Remove Unused CSS JS Files in WordPress 1. So it makes a lot of sense to invest a bit of time to remove unused CSS JS files in WordPress. There’s no way to choose where that particular CSS/JS file gets loaded. What this does is it loads the style.css and filename.js sitewide, regardless of the fact that you’re using a particular shortcode on a single page or a particular widget on a particular custom post type. If you take any plugin that offers a shortcode or Widget for the user, chances are it will load its CSS JavaScript files site-wide like so: It makes a lot of sense to invest a bit of time to remove unused CSS JS files in WordPress. Why Do the Plugins Load So Many CSS JS Files? A better way for plugins to include CSS/JS filesĨ0% of Your CSS JS files Probably Don’t Do Anything 80% of the TimeĪfter the new redesign a few years back, I’ve made it a personal quest to limit the number of CSS and JavaScript files here at Cozmoslabs.Īfter going through the scripts that load on our site, on our homepage we’ve managed to go from:.Remove scripts that won’t work with wp_dequeue_script.Remove unused CSS JS files in WordPress. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |