我目前正在尝试准确地了解当浏览器将文件下载到桌面时会发生什么情况,特别是使用了多少个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"
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. There is a TCP handshake done then the request is transmitted, after that the response is sent back. There is a little more involved if everything is over SSL/TLS, but that's all part of one HTTP request/response cycle.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.