Tuesday, February 28, 2012

A Tutorial On JavaScript and CSS Minification

When a user visits a website for the first time, any external JavaScript and CSS files are downloaded to their cache. Depending on the size of the file, this can take more time for the page to render. With more people surfing using mobile platforms, it is a good idea to minify your JavaScript and CSS files.

External JavaScript and CSS files are external to the page. These usually have an extension of .js or .css. These files can become very large on massive web sites. You can even minify the inline JavaScript and CSS in your web pages. Inline JavaScript and CSS refer to the code that is contained directly in your web page.

If you look at some popular JavaScript libraries like jQuery, you will notice there are two versions. One of the versions has ".min" in the filename. This is a minified version of jQuery. The regular version is 179KB and the minified version is 26KB. That is a substantial savings.

More... [1]

Links
  1. ^ More... (www.htmlgoodies.com)

No comments:

Post a Comment

Search This Blog