PHP Classes

PHP HTML Compressor: Compress Web pages HTML, CSS and JavaScript

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (4 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 367 This week: 2All time: 6,829 This week: 204Up
Version License PHP version Categories
html-compressor 0.10MIT/X Consortium ...5.4HTML, PHP 5, Compression
Description 

Author

This package can compress Web pages HTML, CSS and JavaScript.

It can traverse a directory recursively to find HTML, JavaScript and CSS files.

The files found can be compressed by removing redundant white spaces and comments.

It can also replace specified strings by alternative text.

The processed files are copied to a destination directory.

Picture of Subin Siby
  Performance   Level  
Name: Subin Siby <contact>
Classes: 5 packages by
Country: India India
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Documentation

siteCompressor

A localhost application created in PHP to compress HTML, CSS & JS components of site.

Blog Post - http://subinsb.com/compress-php-website-html-css-js Features

1) Compress HTML

2) Minify JavaScript & CSS files

3) Minify Inline JavaScript, jQuery & CSS in HTML pages (&lt;script&gt;, &lt;style&gt;)

4) Replace Multiple Strings like localsite.dev to mydomain.com

5) Save, Restore & Remove Configurations

6) Choose Site Location & Output folder

7) Real Time Status of site compression

8) Execute Terminal / Shell commands before or after compression

9) Can Run in any localhost server

10) No Database needed

11) Leaves alone PHP files that doesn't have HTML, so that nothing messes up the PHP code Requirements

1) A localhost server that have PHP 5.3

2) Should be able to Use of ob_flush & flush() PHP commands Installation

1) Download the GitHub Zip File or clone the git

2) Extract the File to your localhost destination. On Linux systems, it's /var/www/html

3) Open http://localhost/the_folder_name to see siteCompressor in action. Documentation & Usage

I have published a blog post that covers all this : http://subinsb.com/compress-php-website-html-css-js


  Files folder image Files  
File Role Description
Files folder imagecss (2 files)
Files folder imageincludes (5 files)
Files folder imagejs (3 files)
Accessible without login Plain text file compress.php Example The page where AJAX request to compress goes to
Accessible without login Plain text file index.php Data The main page
Accessible without login Plain text file LICENSE Lic. MIT License
Accessible without login Plain text file load.php Aux. Application script
Accessible without login Plain text file README.md Doc. README

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file main.css Data Auxiliary data
  Accessible without login Plain text file scrollbar.css Data Auxiliary data

  Files folder image Files  /  includes  
File Role Description
  Plain text file class.siteCompressor.php Class The main class
  Plain text file htmlCompress.php Class Class source
  Plain text file min-css.php Class Class source
  Plain text file min-html.php Class Class source
  Plain text file min-js.php Class Class source

  Files folder image Files  /  js  
File Role Description
  Accessible without login Plain text file jquery.js Data Auxiliary data
  Accessible without login Plain text file main.js Data Auxiliary data
  Accessible without login Plain text file scrollbar.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:367
This week:2
All time:6,829
This week:204Up