Php Minify Html. Online compressor for html to reduce file size. Removes whitespace strips comments.
This is to ensure non html output is not broken by minifying it. Minifying html output also reduces the data usage of the user requesting the site. Try our other tools like minify for php.
The if loop before the preg replace function is to ensure minification is performed only if the output is html i e.
Code obfuscation for confidentiality and protection of intellectual properties. Minification can reduce file size upto 70. Compressed files are ideal for production environments. Minification can be done by removing unnecessary details and eliminating excessive whitespaces newlines comments etc.