Minify Resources
What does it mean to minify resources?

One of the methods used by search engines to evaluate a website is to determine the page load speed. How fast your website loads is also relevant for users. A user is much likely to go back in the search results and click on a different website instead of waiting for your web page to load. It is thus important for your website to be optimized for performance.

Minification is a process using which you can optimize your website. It refers to the process of reducing the data in a resource or element without affecting how the resource renders or behaves on the browser at the user's end. An example of this would be to use shorter names for variables or removing unnecessary or unused code.
Why minify resources?

A website loads several different kinds of files on the user's browser in order to load a web page. These include HTML, CSS and Javascript files as well as multimedia content. The code for these is usually written with extra spacing, comments, and formatting, to make it human-readable. However, computers don't need such code in order to process a website. You can thus minify CSS, HTML and Javascript resources in order to optimize your website and improve its performance.

Minifying resources is not the same as compression. When files are compressed, they must be decompressed before they can be run. Minified resources, on the other hand, can be run as-it-is.
How to minify resources?

  • To minify CSS, you can try HTMLMinifier
  • To minify HTML, you can use csso and CSSNano
  • To minify Javascript, you can opt for UglifyJS.
You can also minify resources manually, although this is not recommended since it can introduce errors and break your code. 

To minify resources follow these steps:

  • Remove the comments from the code. Comments are text contained within and including /**/
  • Remove all the extra spaces. Once you remove all the unnecessary spaces, you will see the code appear in a single line.

Plugins are also available that will minify resources automatically. The use of such plugins will eliminate the need for any manual steps.
Keep Learning more from our Learn Technical SEO guides. Do Technical SEO Audit yourself for free here. 

Start generating Leads today

No credit card required – Get started in seconds