1

I am already using HTACCESS through Apache to GZIP the contents of all HTML, CSS and JS files that are served.

I use a program called Koala that automatically minifies JS and CSS output to have zero whitespace, but since I am using PHP to dynamically generated the HTML code, there is no clear way to eliminate unnecessary whitespace in the HTML file that ultimately gets served to the browser.

Since I am already GZIPping the contents of the file, is this even necessary at all?

scrowler
  • 24,273
  • 9
  • 60
  • 92
connergdavis
  • 303
  • 4
  • 11
  • How big are you HTML files? Gzip will take care of html white space for you in it's compression algorithm and realistically it shouldn't be THAT much of a difference. You may want to look into optimizing your server side code before trying to nit-pick on the white space. – Xander Luciano Apr 28 '15 at 06:45
  • The page I am currently writing has a vast amount of images (large slideshows), but aside from those tags, I have kept it as minimal as possible. excluded, I would estimate probably no more than 150 lines if I were to cut out extra empty lines and HTML comment tags. – connergdavis Apr 28 '15 at 07:00
  • honestly I wouldn't even worry about it. Your images are going to take far longer to load that 150 lines of code. Even with whitespace it'd take a few ms – Xander Luciano Apr 28 '15 at 07:03

0 Answers0