Posts Tagged ‘server load’
JS-AIO-Packer v1
Posted by admin | Filed under Uncategorized
Information
JS-AIO-Packer is a PHP script to load all JavaScript files in a given folder into one file, GZip that file if possible, and create a php file to serve the new compact JavaScript file. The benefits of this approach to Static file serving are obvious:
- Less server Load
- Fewer server requests
- Small overall file delivery size
This script allows you to load all of your website JavaScript files into one file for better site loading. JS-AIO-Packer does not employ any ‘eval()’ type packing to you JavaScript, creating near real time execution once the file has been loaded by the requesting browser. Even if not using GZip, JS-AIO-Packer will ‘minify’ your JavaScript, striping out all white space (except line breaks) and comments, decreasing you file size even further.
JS-AIO-Packer is fully commented and PHP v4 compatible. A new version is currently being coded for XtraUpload v2 that will be fully class compliant and much easier to configure.
Download
- JS_AIO_Packer-v1.zip (4.49 KB)
Configuration
There are 3 config options in js_aio.php:
- $filePrefix
The file name you want to give all your outputed files, eg: NAME.js, NAME.gz, NAME.php - $loadFirst
Comma seperated list of files to load first, before all others. Useful for jQuery, where you are most likely to load plugins that need jquery first. - $loadDir
The folder to load relative to this file.
Changelog
Version 1.0.0
- Initial Release
License
JS-AIO-Packer is dual licensed under the following licenses:
XtraFile