六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 23|回复: 0

URL及HTTP请求过程

[复制链接]

升级  39.33%

27

主题

27

主题

27

主题

秀才

Rank: 2

积分
109
 楼主| 发表于 2013-1-23 02:13:38 | 显示全部楼层 |阅读模式
看过老外的一篇文章《What really happens when you navigate to a URL》写的很好,通俗易懂。这对网站的规划、前端优化,都有很强的指导意义。

节选一点:
As a software developer, you certainly have a high-level picture of how web apps work and what kinds of technologies are involved: the browser, HTTP, HTML, web server, request handlers, and so on.

In this article, we will take a deeper look at the sequence of events that take place when you visit a URL.

1. You enter a URL into the browser
2. The browser looks up the IP address for the domain name
3. The browser sends a HTTP request to the web server
4. The facebook server responds with a permanent redirect
5. The browser follows the redirect
6. The server ‘handles’ the request
7. The server sends back a HTML response
8. The browser begins rendering the HTML
9. The browser sends requests for objects embedded in HTML
10. The browser sends further asynchronous (AJAX) requests

查看原文>>>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表