HTTP 消息:
1XX => information
2XX => successful
3XX => redirection
4XX => client error
5XX => server error
HTTP 方法:
The Hypertext Transfer Protocol(HTTP) is designed to enable communications between clients and servers.
HTTP works as a request-response protocol between a client and server.
GET
POST
链接后面需要加斜线吗?
Always add a trailing slash to subfolder references; but not the destination URL.
If you link like this:
href="http://www.w3schools.com/html",you will generate two requests to the server, the server will first add a slash to the address,
and then create a new request like this:
href="http://www.w3schools.com/html/". => right!!!
but,href="http://www.w3schools.com/html/default.html/". => it is wrong to add the trailing slash!!!
URL Encoding
url只能传输ASCII字符,其它字符将会被转义:%hh;空格被转义成+号。
图片是占用HTTP请求的<img src="" alt="" width="" height="" />
If an HTML file contains ten images, eleven files are required to display the page right.Loading images takes time,so :Use images carefully.
It is a good practice to specify both the height and width attributes for an image.
If these attributes are set, the space required for the images is reserved when the page is loaded.
However , without these attributes, the browser does not know the size of the image.The effect will be that the page layout will change during loading(while the images load).