Monday 22 July 2013

Minifying JavaScript, CSS, and HTML files reduces the overall file size,



Minifying JavaScript, CSS, and HTML files reduces the overall file size,

making them load faster on your Web site. Obviously, adjusting each of the
existing files on your site to make them smaller would take quite a lot of time
and programming skills that you may or may not possess. Therefore, you
may prefer to use a plugin or program to adjust these files. A good plugin or
program used to minify files can reduce the file to 30-40 percent of its origi-


nal size, which greatly improves the response time of your Web site.


 The HTML source code from Lisa’s Web site in its regular state, and Figure 5-3 displays it in a minified state. You can see how minifying shrinks the size of the overall file by removing spaces and line breaks, and shortening the characters used.


Use a WordPress plugin (such as W3 Total Cache (http://wordpress.org/
extend/plugins/w3-total-cache) that has a feature that minifies files,
such as JavaScript, CSS, and HTML, by caching the minified files. This leaves
the original files intact so they are easily readable and editable by you.

0 comments:

Post a Comment