Firefox(或 dld 管理器)如何确定正在下载的文件的大小?
其实我想做的是愚弄浏览器,说要下载的文件是1KB,无论文件大小是多少,但它应该下载整个文件!
Actually what I want to do is to FOOL the browser by saying that the file to be downloaded is 1KB, no matter what the file size is but it should download the entire file!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标头中的
Content-length: 1024
,但某些浏览器将此视为福音,并在传输该千字节后切断传输。您无法控制客户端下载后执行的操作。你最多可以给出一些提示(内容类型、长度、倾向),之后就不再由你掌控了。Content-length: 1024
in the headers, but some browsers make take that as gospel and cut off the transfer after that kilobyte's transferred. You have no control over what the client does with a download. At most you can give some hints (content type, length, disposition) and after that it's out of your hands.