PHP Classes

JavaScript Compressor: Pack JavaScript code to reduce its size

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 54%Total: 3,856 All time: 829 This week: 673Up
Version License Categories
javascriptcompressor 1.0GNU General Publi...Text processing, Compression


This package can be used to pack JavaScript code to reduce its size.

It can remove comments, white space and convert the code to a more packed style.

There is also a class that can cache several packed JavaScript code files until they are changed to avoid the overhead of packing the same JavaScript files.

Innovation Award
PHP Programming Innovation award nominee
June 2006
Number 2

Prize: One book of choice by O'Reilly
The surge of interest on AJAX and other Javascript dependent applications lead to the development of large Javascript libraries that are served to the browsers.

Serving many Javascript files increases the bandwidth usage and the application loading overhead.

This class provides a solution that fights this problem by eliminating unnecessary data from Javascript files or using alternative representation of values that take less space.

Manuel Lemos
Picture of Andrea Giammarchi
Name: Andrea Giammarchi <contact>
Classes: 17 packages by
Country: Italy Italy
Age: 46
All time rank: 192 in Italy Italy
Week rank: 286 Down15 in Italy Italy Down
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Plain text file BaseConvert.class.php Class Converts integer to base N
Plain text file JavaScriptCompressor.class.php Class Application core
Accessible without login Plain text file JSL.js Aux. Javascript Standard Library
Accessible without login Plain text file ABOUT Doc. About JavaScriptCompressor
Accessible without login Plain text file Aux. Python version
Plain text file Class Python version
Plain text file JSCCacher Class Caching example class 14KB
Downloadjavascriptcompressor-2006-08-10.tar.gz 11KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
SourceMap Download .zip .tar.gz Generates the JS source code map. Required
 Version Control Unique User Downloads Download Rankings  
This week:0
All time:829
This week:673Up
User Ratings User Comments (1)
 All time
There is a concern related to the encoding.
13 years ago (Jaime Rubio)