HTML Optimizer

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.

Usage

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 use

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

<?php
$no_view = true;
include('html_optimizer.php');
?>

Tips

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

Requirements

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. This website is automatically translated from the english language.
  More information about cookies