WordPress.org

Ready to get started?Download WordPress

Forums

CSS and JS compression? (2 posts)

  1. brashell
    Member
    Posted 1 year ago #

    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?

  2. catacaustic
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.