[英]How's file downloaded by the browser over HTTP
我目前正在尝试准确地了解当浏览器将文件下载到桌面时会发生什么情况,特别是使用了多少个HTTP请求,该过程与仅获取图像或脚本之类的资源有何不同。等等。如果有人从这里开始设计一个进程,则A browser sends HTTP request
。
Content-Type: application/octet-stream Content-Disposition: attachment; filename="picture.png"
Content-Type: application/octet-stream Content-Disposition: attachment; filename="picture.png"
Content-Type: application/octet-stream Content-Disposition: attachment; filename="picture.png"
I know it's a bit of reading, but this is a good resource. 我知道这是一个有点阅读,但是这是一个很好的资源。 Also, for a less intense introduction this helped me out quite a bit.
另外,对于不太激烈的介绍, 这对我帮助很大。
As to the number of HTTP requests used the answer is one. 至于使用的HTTP请求数,答案是1。 There is a TCP handshake done then the request is transmitted, after that the response is sent back.
完成TCP握手,然后发送请求,然后将响应发送回去。 There is a little more involved if everything is over SSL/TLS, but that's all part of one HTTP request/response cycle.
如果一切都通过SSL / TLS进行,则需要更多的精力,但这只是一个HTTP请求/响应周期的一部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.