
HTML Compressor - Reduce the size of HTML, CSS, JavaScript, PHP and Smarty code. You need to enable JavaScript to use this website. Choosing the correct Code Type makes the compression of your code more safe and effective. Choosing the wrong option may lead to fewer optimizations or errors. There are 3 main groups, x/html, CSS and JavaScript. Select JavaScript when you want to compress just JavaScript code, as it would appear in an external.js file. If your JavaScript code contains PHP, ASP or Smarty server side code then select the respective option. note: JavaScript code contained between <script> and </script> tags is considered x/html with embedded JavaScript code. Select CSS when you want to compress just Cascading Style Sheets (CSS) code as it would appear in an external style.css file. CSS code contained between <style> and </style> tags is considered x/html with embedded CSS code. Select x/html for web documents that do not contain server side code, such as static web pages. Select x/html + PHP if you want to compress x/html containing PHP code. How to find out:
YUI Compressor According to Yahoo!'s Exceptional Performance Team, 40% to 60% of Yahoo!'s users have an empty cache experience and about 20% of all page views are done with an empty cache (see this article by Tenni Theurer on the YUIBlog for more information on browser cache usage). In terms of code minification, the most widely used tools to minify JavaScript code are Douglas Crockford's JSMIN, the Dojo compressor and Dean Edwards' Packer. The goal of JavaScript and CSS minification is always to preserve the operational qualities of the code while reducing its overall byte footprint (both in raw terms and after gzipping, as most JavaScript and CSS served from production web servers is gzipped as part of the HTTP protocol). Documentation: Detailed description of the YUI Compressor and how to use it. How does the YUI Compressor work? The YUI Compressor is written in Java (requires Java >= 1.4) and relies on Rhino to tokenize the source JavaScript file. Using the YUI Compressor from the command line