Jump to content
64Bitz
Sign in to follow this  
George Prodromou

What is minified code?

Recommended Posts

You probably heard that you should always minify your files. Tools such as PageSpeed Insights will often flag CSS & JS files for not being minified, but what exactly does it mean?

Minify is the process of removing all unnecessary bytes within a file, such as spaces.

For example, code that has not been minified will look like this.

Unminified Example:

<html>
 <head>
 <style>
 /* awesome-container is only used on the landing page */
 .awesome-container { font-size: 120% }
 .awesome-container { width: 50% }
 </style>
 </head>

Minified Example:

<html><head><style>.awesome-container{font-size:120%;width: 50%} </style></head>

Minifying multiple files with thousands of lines of code, can help reduce the overall page size, resulting in faster page loads.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×