What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Below is an example of how a typical Stack Exchange site page source looks like. That's this page but the results are more or less consistent across pages.

There're completely useless linefeeds circled. Now I don't say all linefeeds and whitespaces should be eliminated - that would hinder readability - but these extra linefeeds are just useless. Note that sometimes there're several linefeeds in row - that is believed to even reduce readability of the HTML.

Could you please get them removed at some point?

enter image description here

share|improve this question
You've tagged this optimization and bandwidth, but your linked post points out that compression means that the difference is only about 10%. Are you arguing that this difference is significant, that this should be done to improve readability, or both? –  Kevin Vermeer Jun 4 '12 at 14:39
I DO NOT think that about 10 lines of whitespace in the source will throw a fit with your ISP... –  amanaP lanaC A nalP A naM A Jun 4 '12 at 14:50
@Kevin Vermeer: Well... 1. these linefeeds are completely useless and 2. removing them can save some bandwidth and 3. removing them can improve readability. Looks like a win-win change yet not urgent of course. Btw 10% is for removing all the whitespaces and that's not a painless change and that's not what I suggest. –  sharptooth Jun 4 '12 at 14:50
@sharptooth 1 is immaterial, 2 is also immaterial, and 3 is both immaterial and subjective. Looks like a meh-meh-meh change to me. –  Kevin Vermeer Jun 4 '12 at 15:10
@KevinVermeer Why is saving bandwidth immaterial? –  Michael Mrozek Jun 4 '12 at 16:54
@MichaelMrozek - Because it results in no noticeable changes in page load times. The time required to send those few blank lines over the wire is much less than time to send the rest of the page and much, much less than the overhead in making the requests and rendering the page. –  Kevin Vermeer Jun 4 '12 at 17:11
add comment

1 Answer

The sizes of this page:

Formatting           | Uncompressed | Compressed (gzip)
Current formatting   | 51340        | 12814
Removing blank lines | 50091        | 12647

That's a 2.4% improvement when uncompressed and 1.3% when compressed.

I'd hardly consider this a ...

share|improve this answer
That's small but worth it IMO. –  sharptooth Jun 4 '12 at 14:52
Huh. 2.4% is higher than I expected it to be. Certainly a micro-optimization, but perhaps it's not completely without merit? (I mean, I've never worked on a very large-scale web application, so this is just speculation on my part) –  jadarnel27 Jun 4 '12 at 14:59
I'm not saying that those blank lines shouldn't be removed, but I don't care and it's hardly a bug. Removing indentation, for example, would save much more bandwidth, especially when uncompressed. The lines look big, but whitespace consumes more bytes. –  Dennis Jun 4 '12 at 14:59
@jadarnel27: Many of the empty lines have actually spaces on them. –  Dennis Jun 4 '12 at 15:01
@Dennis Ah, gotcha. FYI, I've retagged this as a feature-request. That fits better than "bug" here. –  jadarnel27 Jun 4 '12 at 15:03
Absolutely not worth developer time. –  meagar Jun 4 '12 at 15:38
With 3.2M page views/day, that comes to ~13.5GB of bandwidth (assuming 150 bytes of savings per page load) wasted per month just for SO. Probably not worth fixing, although it would depending on how much SO pays for their bandwidth. Also, if bandwidth optimization is a priority, I suspect whitespace cleanup won't be the first thing on the hit list. –  Flimzy Jun 4 '12 at 16:45
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .