News

Overview

Enhance your JavaScript and CSS resources managing

JavaScript Optimizer - JSO is a project that allow you to manage easily your JavaScript and CSS resources and to reduce the amount of data transfered between the server and the client.
To perform this, the following optimizations are performed :
  • Cache optimization : by adding a timestamp and headers informations, the caching resources is more efficient.
  • JavaScript files merging, minimizing if possible.
  • Serving CSS files.
Through these 3 steps, the data transfered is significally reduced.

The resources managing is externalized in an XML descriptor, which make it really easier to maintain.

How it works?

The method to manage the resources is really simple! Here are the features provided by JavaScript Optimizer - JSO:
- In an XML descriptor, the whole application's resources are linked into groups. It is up to you to create your groups and decide whether the resources must be merged and/or minimized or not.
- These concatenated/minimized files are buffered server side and are tagged with the files last modification date.
- As easy as looking at this date, JavaScript Optimizer - JSO regenerate a concatenated file every time a resource is modified (mainly for dev mode).
- A YUICompressor associated and a JSMin are integrated to compress the resulting file as much as possible.
- To provide an easy debugging, a special cookie can be set and override every existing configuration to get to exploded mode. (see FAQ for more information).
- In IE, when the cache is defined as "Refresh for every visit", many requests are performed from the client to the server to check if the file is up-to-date or not. JavaScript Optimizer - JSO permits to avoid these useless requests by setting a expire to resources.

Notes

Performances

As you will see in the Demo section, the code reduction for some basics JavaScript test files is significant.
This impact both the request time and the response length : a single request for JavaScripts file and the response length divided by 2-3.
But better than a long speech, watch the Performances Matrix , try it online or download it and see how mandatories these optimizations are.