>
 



I have written couple of articles on Google's Closure Compiler:


In terms of Javascript Compression, the most widely used tools are: JSMIN, the DOJO Compressor, Dean Edwards’ Packer and YUI Compressor. The YUI Compressor is designed to be 100% safe and yield a higher compression ratio than the other tools listed above. That’s why most of the JavaScript Frameworks use YUI Compressor to minimize their Javascript code

On November 5th, Google announced Closure Compiler for Javascript compression. The strongest part of the Closure Compiler is that it does not only remove whitespace but also it rewrites Javascript Code to make it smaller. It also optimizes your Javascript code to perform better.

In this post, I compared the compression performance of YUI Compressor and Google Closer Compiler using the well-known Javascript Frameworks - Mootools, JQuery and Prototype:

Comparing YUI Compressor and Closure Compiler
Comparing YUI Compressor and Closure Compiler - the values given in the chart are bytes

 

More...

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



Recently, I have written a C# wrapper for Google Closure Compiler to use with ASP.NET for on-the-fly JavaScript compression. For those who want to use the Closure Compiler with PHP, Bohuco.net has an article showing how to use the Google Closure Compiler over its RESTful API with PHP5.  

$script = file_get_contents('http://www.domain.com/scripts/script.js');
$ch = curl_init('http://closure-compiler.appspot.com/compile');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'output_info=compiled_code&output_format=text&compilation_level=SIMPLE_OPTIMIZATIONS&js_code=' . urlencode($script));
$output = curl_exec($ch);
curl_close($ch);

You can find more details on using Closure Compiler with PHP 5 here.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



On November 5th, Google released Closure Compiler for Javascript optimization. The strongest part of the Closure Compiler is that it does not only remove whitespace but also rewrites Javascript Code to make it smaller. It also optimizes your Javascript code to perform better. You can find more details and all of its features on my previous article: Closure Compiler – Javascript Compiler by Google.

During my tests, Closure Compiler reduced Javascripts more than 60%. Considering, the size of Javascript files that modern websites have and the reduction before HTTP compression, Closure Compiler is really useful. 

Closure Compiler comes with a Java based command line tool and a RESTful API.  RESTful API works great and very fast. API can be used with a MSBuild or NAnt script to automatically compress Javascript files.

I wrote a C# wrapper for the Google Closure Compiler:

Google's Javascript compressor - C# wrapper
C# wrapper for the Google Closure Compiler

 

More...

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



Yesterday, Google introduced Closure Tools (announcement) to enable easy creation of web applications. The tool set containsClosure Compiler, Closure Library and Closure Templates

Closure Compiler is a Javascript optimizer that compiles javascript code into a compact, high performance form. The compiler does more than a standard Javascript compressor. The Closure Compiler reduces the size of your JavaScript files and makes them more efficient, helping your application to load faster and reducing your bandwidth needs. Moreover, it removes dead code, rewrites the code to improve code running speed on browsers' Javascript engines. It also checks syntax, variable references, variable types and warns about Javascript errors.  

Google's Javascript compressor
Closure Compiler by Google - reduces the size of your JavaScript files and makes them more efficient

 

More...

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5



A lot of articles have been written on website performance optimization lately but I want to share my hands-on-experience and important articles on the subject.

There are two types of performance:

  • Server Performance
  • Perceived Performance

 

Server Performance is associated with the number requests that a server can handle at a time and the time needed to process these requests. On high volume websites, since it determines the number of users a machine can serve before additional server is needed, this performance aspect is very important.

More...

Currently rated 5.0 by 6 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5