了解Facebook和Gmail中的页面来源 [英] Understanding The Page Sources in Facebook and Gmail
问题描述
我一般都会喜欢:
- 为什么流行的网站如Facebook和Gmail看起来不像
正常网站?更具体地说,HTML似乎在JavaScript脚本中,并且css类名称和ids看起来像随机字符(后一个功能对于Gmail尤其如此)。 - 哪里可以获得一般的这些技术的概述。我从来没有遇到任何说明他们的材料。
也许我们可以专门面对Facebook和Gmail,不要这样做太一般了。
Facebook主要使用 OpenSource 软件,你可以看看他们。
更具体来说,HTML似乎是内部的JavaScript脚本和css类的名称和ID看起来像随机字符。
Google使用这些随机字符,可能是因为每个人都很难尝试克隆它/理解它?
Facebook使用普通的类名。他们的HTML在脚本中,在(称为)小册子中,您可以阅读他们的这里
此外,还有一个很好的关于高可扩展性的博客
I've been designing websites for a couple years now. I've become quite familiar with some of the more "advanced" features such as PHP frameworks and AJAX.
That said, whenever I look at page sources behind popular sites like Facebook and Gmail, I scratch my head because they look nothing like what I've taught myself. It's full of javascipt "stuff". Even big companies like GE and Amazon have comprehensible page sources. I'm sure it's something to do with the fact there are so many server requests that go on in popular websites.
I would love to know, generally speaking:
- Why do popular websites like Facebook and Gmail look nothing like "normal" websites? More specifically, the HTML seems to be inside javascript scripts and the css class names and ids look like random characters (that latter feature is especially true for Gmail).
- Where can one get a general overview of these technologies. I've never come across any materials that illustrate them.
Perhaps we can speak specifically to Facebook and Gmail so not to make this question too general.
Facebook mostly use OpenSource software, you can take a look at them.
More specifically, the HTML seems to be inside javascript scripts and the css class names and id look like random characters.
Google uses these random characters, probably because it's hard to everyone to try to clone it/understand it?
Facebook uses normal class names. Their HTML is in scripts, in (called) pagelets, you can read about them here
Also, there's a nice blog about HighScalability
这篇关于了解Facebook和Gmail中的页面来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!