TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is Amazon's HTML crazy?

9 点作者 samdunne大约 12 年前
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 条评论

gee_totes大约 12 年前
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>
rzimmerman大约 12 年前
For some reason they have the following comment towards the bottom of the homepage:<p>&#60;!-- MEOW --&#62;
评论 #5670786 未加载
fadzlan大约 12 年前
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.
houjieth大约 12 年前
Because they are all legacy code. No one wants to do the cleaning work.
评论 #5671027 未加载
wcfields大约 12 年前
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.
ibudiallo大约 12 年前
html is for the browser to read not people.