I have written couple of articles on Google's Closure Compiler:
Comparing YUI Compressor and Closure Compiler - the values given in the chart are bytes
$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);
You can find more details on using Closure Compiler with PHP 5 here.
I wrote a C# wrapper for the Google Closure Compiler:
C# wrapper for the Google Closure Compiler
Yesterday, Google introduced Closure Tools (announcement) to enable easy creation of web applications. The tool set contains: Closure Compiler, Closure Library and Closure Templates.
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.