简体   繁体   中英

zip.js loads inflate.js several times

I use zip.js to unzip file in browser. But it loads inflate.js many times from client. Each load is successfull (200/304) but why does this happen so many times? How can I load inflate.js once on web page load? 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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