Compress WordPress core files ( JS and CSS )

I checked WordPress core files, and I found a lot of uncompressed JS and CSS files. Is there any disadvantage, if I compress these files using YUI-Compressor?

Secondary question: Why didn’t compress these files

Thanks!

2 Answers
2

Minifying the CSS and JavaScript files is totally optional.

The most important result is that your files are going to take less space, and be served more quickly. This will result in saving bandwidth, if you have a limited plan. These files will be executed in the client, so the more optimized they are, the better user experience they create.

The core files are not compressed by default because developers may need to debug/modify the code, and it’s pretty hard to debug a minified code, until you unminify it first.

However, sometimes compressing JS files may result in errors and jQuery conflicts. But if the plugin does it’s job neat, then there shouldn’t be a problem.

Automtimize is a well known plugin for minifying and combining scripts and styles without a problem.

Leave a Comment