Keep following code very top of your side page.
Example:
PHP
<?php
function minify_output($buffer){
$search = array('/\>[^\S ]+/s','/[^\S ]+\</s','/(\s)+/s');
$replace = array('>','<','\\1');
if (preg_match("/\<html/i",$buffer) == 1 && preg_match("/\<\/html\>/i",$buffer) == 1) {
$buffer = preg_replace($search, $replace, $buffer);
}
return $buffer;
}
ob_start("minify_output");?>
How to minify all html code of Your Website | PHP Cache Tutorial |
How to minify html code of Your Website | PHP Cache Tutorial |
How to make short all codes of your website | PHP Cache Tutorial |
How to create PHP Simple HTML Cache for a Web Page | PHP Cache Tutorial |
How to minify all code of Your Website | PHP Cache Tutorial |
Type: | Php |
Category: | Web Tutorial |
Sub Category: | PHP Cache Tutorial |
Uploaded by: | Admin |