JavaScript and CSS Compressor to optimize webpage load speed

Web Optimizing with compressed CSS and JavaScript


The script will intercept the attempt to retrieve something from the javascript directory and will notice that you want to fetch multiple files at once. It will then concatenate the requested files, compress it and send it as one to the browser.



Take for example the following URLs:
http://www..../x1.js
http://www..../x2.js
http://www..../x3.js

Combine all these files to a single file by simply changing the URL to:
http://www...../x1.js,x2.js,x3.js

http://www.xtreeme.com/javascript-optimizer/

  • Serving JavaScript Fast

    “With our so-called “Web 2.0″ applications and their rich content and interaction, we expect our applications to increasingly make use of CSS and JavaScript. To make sure these applications are nice and snappy to use, we need to optimize the size and nature of content required to render the page, making sure we’re delivering the optimum experience. In practice, this means a combination of making our content as small and fast to download as possible, while avoiding unnecessarily refetching unmodified resources.”
  • YUI Compressor for JavaScript and CSS

    “The YUI Compressor is a JavaScript compressor which, in addition to removing comments and white-spaces, obfuscates local variables using the smallest possible variable name. This obfuscation is safe, even when using constructs such as ‘eval’ or ‘with’ (although the compression is not optimal is those cases) Compared to jsmin, the average savings is around 20%. The YUI Compressor is also able to safely compress CSS files. The decision on which compressor is being used is made on the file extension (js or css).”
  • JSMin- The JavaScript Minifier

    “JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation.”
  • Packer – A JavaScript Compressor

    Online JavaScript Compressor. You can also download PHP, perl and .NET versions of this tool.
  • CSS Formatter and Optimiser
    CleanCSS is a powerful CSS optimizer and formatter. Basically, it takes your CSS code and makes it cleaner and more concise. It helps you get smaller CSS file sizes and better written code. The way the optimizer works actually lets you decide how much compression you want. From super compressed (virtually unreadable and editable by a human being) to visually pleasing. I prefer the standard setting because it gives you a little of both.