Web page optimization: How to solve “Minify CSS, HTML or JavaScript”

Are you optimizing the speed of your WordPress site? What does the message “Minify CSS, HTML or JavaScript” mean, and how do you fix it?

To understand what minification is, let us take a small piece of code as an example. We, programmers, try to write code that is also readable to other programmers. This is useful if you are working on a piece of software with several people or if you want someone to be able to make changes to your piece of code in the future.

Take the following piece of Javascript as an example.

var array = [];

for (var i = 0; i < 20; i++) {

array[i] = i;


This is precisely the same as the piece of code below, but this is “minified” code.

for(var a=[i=0];++i<20;a[i]=i);

As you can see, this is a lot shorter. In practice, minification means that unnecessary characters such as enters and spaces, which make it a lot more readable for us humans, are left out. A computer sees no difference.

Every KB counts

For a small piece of code like the one above, this makes little difference, but when you apply the same technique to thousands of lines of code, it can easily save several KBs (Kilobytes), up to MBs (Megabytes) of data. Data does not have to be sent over the Internet to the user’s browser from the webserver. Every KB counts and saves download time.

There are various tools on the Internet for quickly “minifying” pieces of CSS, HTML, or Javascript. You can use the following tool for this purpose: Minifier

After minifying the file, you can upload it to your server again.

Attention: Making adjustments to HTML, CSS, or Javascript files is for advanced users only. If you make mistakes, you risk making your website inaccessible. So make sure you know what you are doing or call in a professional.

Working on optimization yourself? Then use these tools:

  • GTmetrix
  • Pingdom Tools
  • Google PageSpeed


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer