3

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?

0

3 Answers 3

6

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.

Sign up to request clarification or add additional context in comments.

Comments

5

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.

1 Comment

This, most likely. Plus the fact that they couldn't care less. Most pages on the internet are served with gzip compression, wich more or less strips out the whitespace bandwidth-wise.
2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.