这可能吗?我认为只要服务器支持resume(HTTP RANGE)就可以了。
答案 0 :(得分:2)
使用XMLHttpRequest.prototype.setRequestHeader()
设置RANGE
请求标头:
//Our AJAX object:
var req = new XMLHttpRequest();
req.open([REQUEST METHOD], [REQUEST URI], true);
//Set the RANGE header here:
req.setRequestHeader("RANGE", "value-of-RANGE-header");
// [Here, set anything else you need before sending the request, like onstatechange]
//Now, send!
req.send();