Minify html php

hi all

I just installed/ enabled gzip on the server.

In the headers i can see

content-encoding: gzip

but google still saying to minify html

minify html

I cannot minify manually thousands of html pages which are output by php. How to do it automatically ??

do i need to install something to minify html on server ??

or can it be done with php ??



I have not done this for a while but I think you need this at the start of your php page:


Hi rubble

i tested it on my local xampp and it didnt worked

i have enabled in my http.conf

LoadModule headers_module modules/
LoadModule deflate_module modules/
LoadModule filter_module modules/

how can i check it on my local xampp server


Hi rubble

i can see in the headers for xampp webpage

content-encoding: gzip

so this means gzip is enabled on xampp.

but now how to minify html ??

gzip will allow you to serve a compressed version of the page, but that is not the same thing as minifying your HTML.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.