Reputation: 9338
My question is not exactly about css, but about spaces within the html page between tags etc.
Is there any reasons the page http://m.aol.com/portal/ contains so many spaces in the html code (please view the source code of http://m.aol.com/portal/ page)? Am I missing something?
How does it happen so many spaces are on the page in the mobile version? Any guess? Why and what for?
Upvotes: 3
Views: 119
Reputation: 4519
It's probably generated by some server side language (e.g. ASP.NET
), so programmers and webmasters don't work directly with this HTML code.
Upvotes: 5
Reputation: 80
Any more than one space is generally ignored by a browser. Spaces and Tabs are usually used to indent the source files to achieve better readability. Using a server side language (such as PHP
) can result in such messy html sources.
However these non printable signs need to be transferred from the server to the user resulting in an undesired overhead. Google for example is stripping most of the white-spaces from its scripts and pages in order to save precious time and bandwidth.
Upvotes: 2
Reputation: 606
They probably don't care because the document itself is being gzipped and then unpacked on client side. So even they delete those spaces this won't reduce traffic much.
Upvotes: 6