HTML Optimization

HTML Optimization means to reduce the length of web page contents by eliminating extra non required white spaces. This may also help in boosting the load speed. The benefit of optimized pages is that they consume lower bandwidth and load faster due to fewer contents as compared to the original.

PTSource HTML Optimizer

PTSource HTML Optimizer is a free script that safely reduces the size of your html code, embeds and minify all the CSS boosting the load speed in the manner that pages consume lower bandwidth.


Once included, the HTML optimizer automatically installs a handler for HTML output that optimizes the HTML output and replaces it with the optimized version. No additional coding is required.

By default the html output lets the website context menu active, but this behaviour can be configured by setting $no_view to true before including the html_optimizer.php file.

How to install

Change the extension of your index.html file to index.php and include the code bellow at the top of your index.php.

$no_view = true;

When using css imports use the full url instead of relative paths.


Developed using php 7.4.5 but it should work with any php version.

Download Now

We use cookies to personalize and enhance your experience on our site. By using our site, you agree to our use of cookies.
  More information about cookies