简体   繁体   English

zip.js多次加载inflate.js

[英]zip.js loads inflate.js several times

I use zip.js to unzip file in browser. 我使用zip.js在浏览器中解压缩文件。 But it loads inflate.js many times from client. 但是它会从客户端多次加载inflate.js。 Each load is successfull (200/304) but why does this happen so many times? 每次加载都成功(200/304),但是为什么会发生那么多次? How can I load inflate.js once on web page load? 如何在网页加载后一次加载inflate.js? This is my usage code: 这是我的用法代码:

zip.workerScriptsPath = 'lib/';
var br = new zip.Data64URIReader(blob);
zip.createReader(br, function (reader) {
  /// ...
}

萤火虫资讯

zip.useWebWorkers = false; 

and including 并包括

<script type="application/javascript" src="lib/inflate.js"></script>

statically fixes the problem 静态解决问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM