Ole*_*leg 10 javascript html5 offline offline-caching service-worker
我在缓存存储中存储视频时遇到问题.如果视频尺寸较小,它可以正常工作,但如果它的大小约为100MB,我会收到此错误:
DOMException: Entry was not found.
我使用以下代码:
fetch(videoUrl).then(function(res) {
var responseToCache = res.clone();
caches.open('videos').then(function(cache) {
var request = new Request('https://example.com/video.mp4');
cache.put(request, responseToCache).catch(function(err) {
console.log(err); //this is where the error is thrown
});
});
});
Run Code Online (Sandbox Code Playgroud)
我可以存储多个总大小> = 100 MB的小文件.
我想这是Chrome浏览器的限制,但我在Internet上找不到任何引用.
有没有办法避免这种限制?
编辑:
我可以存储的最大视频大小是64MB.如果大小超过该大小,则会发生错误.
编辑2:
该错误仅在Chrome中出现.Firefox没有这样的限制.我在Firefox中尝试了大小> = 350MB的视频和OK.
| 归档时间: |
|
| 查看次数: |
1518 次 |
| 最近记录: |