• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
  • VPS
    • VPS Hosting
    • Flex VPS
  • Reseller
  • Email
  • Gaming
  • Domains
  • Website Builder
  • Account
  • Blog Home
  • Categories
  • Authors

Is Minification Still A Good Idea These Days?

Bhagwad Park

Published on: March 4, 2020

Categories: Website Performance 0

In the early 2000s, heading into the first decade, there were a few common pieces of wisdom that everyone accepted when it came to speeding up your site for CSS, JS, and HTML:

  1. Minify EVERYTHING
  2. Combine EVERYTHING

So if your site had 10 CSS files and 5 external JavaScripts, you would ultimately have just 2 – one combined and minified file for JS, and one for CSS.

Modern day best practices have come a long way since then. HTTP/2 came a while back, and HTTP/3 is just around the corner. And presumably, there’s a lot more to come after that. These new technologies, along with increased universal bandwidth, have greatly changed what the “best practices” are. For example, last year I wrote about how the practice of combining JS and CSS is outdated.

But what about minification? Is this something that’s still valuable? Let’s see.

Pre-Minified Libraries are the Best

The best-case scenario is that you’re using a public library like jQuery that’s already minified. This can actually result in quite significant savings, especially when you consider the size of something jQuery. Here’s a comparison of normal vs minified jQuery sizes computed from Google’s public library:

  1. Size of jQuery original: 288 kb (Link to original jQuery)
  2. Size of jQuery minified: 94 kb (Link to minified jQuery)

All public libraries serve minified versions of their assets, so you should be using these automatically whenever you get the chance. In addition, lots of plugins now automatically include pre-minified versions of JavaScript and CSS in their “asset” folders, making it easy for us.

In a way, the question of minification for optimization has become moot because the most impactful assets have already been minified!

Un-Minified Assets Might Not be Worth Minimizing

Nonetheless, there are some plugins that continue to use “normal” JavaScript. But the big question is: “Is it worth the effort?” For example, on my WordPress site, I use the plugin called “Better Search Replace”. This has a JS file called better-search-replace.js, which as you can see, is unminified (name doesn’t end with min.js).

But the size of this file is only 4 kb! In today’s world of high Mbps bandwidth, I’m not entirely sure it’s even worth minimizing a 4 kb file. After minification, it would be 2.7 k.

Remember, that manual minification comes at a slight cost. Your server has to first perform the minification, and some plugin has to include a hook that replaces the original JS with the minified one. All for saving a few KB?

Not worth it, in my opinion.

What About Minifying HTML?

If you want to go down the road to the end, you’ve probably encountered the option of minifying your HTML too! But this is where I draw the line. While the value of minifying plugin JS or CSS is questionable, I think minifying HTML is actually harmful for these reasons.

1. HTML Changes Frequently

Since any minification takes server resources, it’s worth minimizing only those assets which are relatively unchanging like CSS and JS. HTML changes too frequently to be worth it IMHO.

2. HTML Pages Are Too Numerous

At most, there are only a handful of JS and CSS files on your site, and some of them won’t even be loaded each time. A typical site on the other hand, can easily have hundreds of HTML pages. Minifying them all, and then invalidating them when you simply add another post is just too much effort.

Not to mention the file clutter of storing hundreds of copies of minified HTML pages. Cloudflare offers to do this for you automatically, but I just disable that option.

Bottom Line

Minification is no longer this “must do” thing that website owners have to worry about. That’s not to say it isn’t useful – it is! Just that most of the low hanging fruit has already been plucked by pre-minified files, and there’s not much left for web owners to do. You can try and manually minify your JS and CSS files that haven’t already had the process applied to them, but it’s not worth it in my opinion. And HTML minification? Give it a pass!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Related Posts

How To Fix Status Code 405 Error On Your WordPress Site

The Status Code 405 Error can be very annoying when trying to setup or work on your WordPress site. Here's our guide on how to fix it!

How to Fix the 504 Upstream Request Timeout Error (5 Ways)

We'll take a closer look at the Upstream Request Timeout error. Then, we'll discuss some common causes and show you how to fix it.

How to Fix The ‘ECONNREFUSED: Connection Refused By Server’ Error

Stuck with the ECONNREFUSED: Connection Refused By Server error? Here's a few quick, easy to understand ways you can fix it.

How To Fix The ‘Aw, Snap!’ Error (Eight Easy Ways)

Did you run into the Aw Snap! error in Google Chrome? Check out our guide on how to fix it quick with these 8 possible solutions.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup (2024)

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • Email Hosting
  • Game Hosting
  • Domains
  • Website Builder
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2025 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA