What happens after we type" www.baidu.com "
What happens after we type "www.baidu.com"?
First the browser creates a HTTP GET request like this:
GET/index.html HTTP/1.1
Host:www.baidu.com
User-Agent: GoogleChrome/......
.......
Then the HTTP GET is sent to the server,and the server finds the page index.html of baidu. Then the sever generates an HTTP response like this:
HTTP/1.1 200 OK
Set-Cookie:.....
....
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"><title>百度一下,你就知道 .... |
....
The HTTP response is sent to the browser ,then the browser renders the HTML .Up to this , we can see the home page of baidu on the browser.
跟我走啊~~