4 ms·
Just 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 minif
by salehenrahman 14y ago
Just 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);