When trying to optimize your site for speed, you really want to remove unused CSS JS files in WordPress . With WordPress sites using a lot of plugins, when you try to optimize page loading times you’ll soon hit a roadblock. You got a good fast host, enabled caching, optimized your images and removed any plugin that you don’t use. Next on the list is to optimize or remove unused CSS JS files in WordPress. We’ll go through: 80% of your CSS JS files probably don’t do anything 80% of the time After the new redesign a few months back, I’ve made it a personal quest to limit the number of CSS and JS files here at Cozmoslabs. After going through the scripts that load on our site, on our homepage we’ve managed to go from: 15 JS scripts and 11 CSS files to: 4 JS scripts and 2 CSS files Why plugins load so many CSS JS files? If you take any plugin that offers a shortcode or Widget for the user, chances are it will load it’s CSS JS files site-wide like so: 1 2 3 4 5 6 7 8 9 10 function pluginslug_enqueue_style() { wp_enqueue_style( 'my-css-handle', 'style.css', false ); }   function pluginslug_enqueue_script() { wp_enqueue_script( 'my-js-handle',
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.