JavaScript Tip: Minifying Code

Once you’ve written, tested, debugged, optimized, and finalized all of your code, it’s time to release it into the wild. This is to say: distribute the code on live sites. There’s one more step you could take before doing so: minify the code.

To minify code is to remove all of its comments and extraneous white space in order to condense the code as much as possible. Minifying a script will significantly reduce its file size, perhaps by as much as 50 percent. This in turn makes the site load faster in the browser, as there will be less data for the user to download. Continue reading