Support » Plugins and Hacks » Hacks » CSS and JS compression?

  • brashell

    (@brashell)


    Why is it that every wordpress CSS and JS file has a .min version, and a normal version, where the .min is the compressed version of the regular one? Why is there a need for two?

Viewing 1 replies (of 1 total)
  • catacaustic

    (@catacaustic)

    very awesome

    This is because there’s a difference between production and development.

    A minified JS file is grat for production sites because it reduces the file size and makes it easier and quicker to load everything that the site needs. If you look at this file you’ll find that it’s almost always completely unreadable to humans. It’s designed for browsers only.

    A “normal” version is used when you’re devleoping your new theme or plugin and you need to find out where that pesky error is coming from. Using the normal version you can see where things break and what’s happening because it’s easily readable (assuming that you understand JavaScript that is).

    In a normal live public site you should always use the minified version where ever possible so that you can make thing quicker for your visitors and wave your own bandwidth.

Viewing 1 replies (of 1 total)
  • The topic ‘CSS and JS compression?’ is closed to new replies.