Similar to “tabs vs spaces” you’ll find WordPress developers who are passionate about their opinions on whether or not plugin and theme styles and scripts should be minified or not. I personally think that developers should be doing everything possible to make their plugins have the lightest footprint possible on a users website. Those who argue against it typically argue that minified scripts are difficult and tedious to troubleshoot. That’s absolutely true, but that’s not a reason to not use them in your theme or plugin. At least not if you are doing so responsibly. That’s what this article is about. Why You Should Load Minifed CSS in Plugins and Themes There are a few strong reasons to use minified scripts in your plugins and themes. #1 It’s Considerate to your Users This to me is the most important reason. When you are shipping code for others to use you want to be as considerate of their website as you can be. This goes along the lines of why you include inline documentation and easy to read function names. Shipping the smallest files you can to your users tells them that you know their bandwidth and page speed is important to you. #2 Caching
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.