4 ms·
I love optimizing front-end including HTML outputs, even prematurely so. My sites are low-traffic and lightweight anyway, but for me this is a form of zen.
by pestaa 14y ago
I love optimizing front-end including HTML outputs, even prematurely so. My sites are low-traffic and lightweight anyway, but for me this is a form of zen.
- TazeTSchnitzel 14y agoYour website's HTML isn't minified ;)
- pestaa 14y agoIt is not an active one as you can probably tell...
- salehenrahman 14y agoJust curious: what do you use to minify? In an earlier comment, I said that most templating engines that I used don't minify. You'd have to write your own minifier. (I used Jinja, by the ways.)
- maratd 14y agoIt's pretty simple. Use a regex to eliminate whitespace and then gzip. Be sure to set the proper headers if you gzip. I eliminate whitespace with the following PHP code: preg_replace(['/\t+/', '/>\s+</'], [' ', '><'], $html);