A LIST Apart: For People Who Make Websites

No. 310

July 20, 2010

Learn how to create inline SVG with Raphaël and take JavaScript minification to the next level.

SVG with a little help from Raphaël

Want to make fancy, interactive, scalable vector graphics (SVGs) that look beautiful at any resolution and degrade with grace? Brian Suda urges you to consider Raphaël for your SVG heavy lifting.

JavaScript Minification Part II

Variable naming can be a source of coding angst for humans trying to understand code. Once you’re sure that a human doesn’t need to interpret your JavaScript code, variables simply become generic placeholders for values. Nicholas C. Zakas shows us how to further minify JavaScript by replacing local variable names with the YUI Compressor.

A List Apart explores the design, development, and meaning of web content, with a special focus on web standards and best practices. Explore our articles or find out more about us.

Editor’s Choice

originally ran: April 20, 2010

Better JavaScript Minification

Like CSS, JavaScript works best and hardest when stored in an external file that can be downloaded and cached separately from our site's individual HTML pages. To increase performance, we limit the number of external requests and make our JavaScript as small as possible. JavaScript minification schemes began with JSMin in 2004 and progressed to the YUI Compressor in 2007. Now the inventor of Extreme JavaScript Compression with YUI Compressor reveals coding patterns that interfere with compression, and techniques to modify or avoid these coding patterns so as to improve the YUI Compressor's performance. Think small and live large.