Today we want to introduce you to the Static File Optimization Script called lightscript. We use some techniques of the script in our web-based projects. The handling is very easy and the effect is huge. Lightscript allows the user to gzip, merge and cache the merged files on the fly. Now, we have to explain some aspects of lightscript.

$cache_dir and $script_dir are the variables that point out the place where the scripts are located and where lightscript can store cached files. Make sure that these directories are writeable (777). In the downloadable archive we have created 2 folders (scripts & cache). You can use this folders by default.

Lightscript also implements some cache directives.

header("Expires: ".date('r',mktime(0,0,0,12,12,date('Y')+5)));
header("Pragma: public");
header("Cache-control: public");
You can perform a request on lightscript in the following way:
With q you can list all files you need and with c you decide whether cache the file or not (c=1 || c=0).

Here you can download lightscript in version one.