TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why is Amazon's HTML crazy?

9 pointsby samdunneabout 12 years ago
If you view the source on any product page you have around 100 lines of whitespace and the &#60;title&#62; isn't found until line 3,500-ish<p>Not to mention all of their CSS is inline<p>Why is it like this? It seems to me it is far more complex than it needs to be

6 comments

gee_totesabout 12 years ago
How is this crazy?<p>* Newlines seperating HTML tags (check)<p>* Semi-semantic class and id names (check)<p>* Can read it with raw view-source (check)<p>You wanna see something really crazy? View-source on this one:<p><a href="https://plus.google.com/101139676677179148632/about?hl=en" rel="nofollow">https://plus.google.com/101139676677179148632/about?hl=en</a>
rzimmermanabout 12 years ago
For some reason they have the following comment towards the bottom of the homepage:<p>&#60;!-- MEOW --&#62;
评论 #5670786 未加载
fadzlanabout 12 years ago
I would suppose when you see a page from Amazon, there are numbers of the system that contributes to the page. Some with HTML, some with API. And as other commenter mentions, these are all generated by some backend system. Probably no one has to full control on how to format HTML at the front. Or they probably can, but with a lot of meetings.<p>The store front probably just gather all this stuff to produce the final page that you see.
houjiethabout 12 years ago
Because they are all legacy code. No one wants to do the cleaning work.
评论 #5671027 未加载
wcfieldsabout 12 years ago
Just took a quick look. I'm guessing they separated it into 20+ linebreaks between chunks to delineate which section of code produced which HTML.
ibudialloabout 12 years ago
html is for the browser to read not people.