HTTP 部分 GET 是可靠的机制吗?

发布于 2024-07-21 22:25:01 字数 59 浏览 2 评论 0 原文

HTTP 部分 GET 是可靠的机制吗? 如果是的话,为什么现代浏览器似乎仍然从头开始而不是恢复下载?

Is HTTP partial GET a reliable mechanism? If it is, how come it seems like modern browsers still start from the beginning instead of resuming the download?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夏末染殇 2024-07-28 22:25:01

根据我的经验,此功能并非在所有 Web 服务器上都普遍存在。 可能是因为它没有被网络客户端广泛使用。 有点像 HTTP HEAD 请求,可能会也可能不会实现。 与往常一样,YMMV 取决于所涉及的客户端和服务器。

下载恢复机制基于 HTTP 范围请求标头,指定您想要的内容部分(请参阅 此处)。 在过去的几年里我没有搞过这么多,所以你可能会更好地做更多的谷歌研究。 以下是博客帖子的链接谈论有关此功能的一些最新进展。

In my experience this feature is not ubiquitous across all web servers. Probably because it is not a widely used by web clients. Sort of like HTTP HEAD requests which may or may not be implemented. As always, YMMV depending on the clients and servers involved.

The download resumption mechanism is based on HTTP range request headers that specify what part of the content you want (see here). I have not messed with this much in the last few years, so you may be better served doing a little more Google research. Here is a link to a blog posting that talks about some the latest developments regarding this feature.

欢烬 2024-07-28 22:25:01

每当我使用 wget 下载大文件时,我可能会中断它们并使用 -c 继续。 我不记得曾经收到过损坏的文件。 Safari 允许您恢复(而不是重新启动)已停止的下载,在那里也可以正常工作。

Whenever I download big files with wget, I might interrupt them and resume with -c. I don't remember ever getting a corrupted file. Safari allows you to resume (instead of restart) a stopped download, works fine there too.

孤蝉 2024-07-28 22:25:01

是的,如果做得正确(If-Match etag...),它是可靠的。

Yes, when done properly (If-Match etag...), it is reliable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文