YSlow: Minify JavaScript and CSS More Recommendations

Rule Summary

CSS/JS
Medium
75%

Overview

Strip unnecessary characters from JavaScript and CSS to speed up download times.

How does your site score on this rule?

Details from Yahoo!

Minification removes unnecessary characters from a file to reduce its size, thereby improving load times. When a file is minified, comments and unneeded white space characters (space, newline, and tab) are removed.

This improves response time since the size of the download files is reduced.

recommends:

Two popular tools for minifying JavaScript code are JSMin and YUI Compressor. The YUI compressor can also minify CSS.

In addition to minifying external scripts and styles, inlined <script> and <style> blocks can and should also be minified. Even if you gzip your scripts and styles, minifying them will still reduce the size by 5% or more. As the use and size of JavaScript and CSS increases, so will the savings gained by minifying your code.

Read More

Contribute to this recommendation

Have an opinion, link, or other contribution to share regarding this recommendation? Share it with us and help make the web a faster place!