We have been trying to eliminate all of the extra blank lines that appear in the markup of our pages, but I have discovered that most of these are actually coming from comments in the template files.
Each of those highlighted comments end up as blank lines in the final HTML output. Since each template ends up pulling in more templates, this adds up to a lot of blank lines.
Does anyone know of a way around this? I imagine there isn't, but I thought I should ask.
The comments themselves are not rendered, but a blank line is rendered whenever such a comment is encountered in the code. I have verified this by removing the comments in the templates and reloading the resulting page to see the relevant blank lines removed.
I am referring to the extra blank lines that show up in the markup....
Does the same JSP trick work here? Just remove the newlines from the source.
If you are delivering content through the dispatcher and it does gzip encoding most of the white space bytes would be removed in the compressed version, so the overhead over the wire would be relatively small.
Sorry, but I don't think I can share the full HTML. The image I posted shows the head, and you can clearly see all the blank lines. Each blank line there actually corresponds to a comment in a template.
Thanks, Arun. I suppose it could be related, but that depends on whether or not they consider comments the same as other hidden tags. Sure seems like a bug to me and not a new feature!