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



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.

| improve this answer | |

If you have a web server that support gzip compression, it might not make a lot of a difference.

Also, the size probably is still rather small by nowadays standards, compared to web fonts, videos, and likely even the images on an average site. Static files will also temporarily be cached client side.

If you don't have a traffic problem, why optimize? What do the logs say where you need most traffic?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.