HTTP & URL

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).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值