Get the latest tech news
How to Create HTML/ZIP/PNG Polyglot Files
Learn how to create HTML/ZIP/PNG polyglot files in JavaScript
The assets/main.js script on this “bootstrap page” reads the ZIP data by calling fetch(””) and uses the lib/zip.min.js JavaScript library to extract it. However, there’s a problem: due to the same-origin policy, retrieving ZIP data directly with fetch(””) fails when the page is opened from the filesystem (except in Firefox). For the last point, “consolidation data” in a JSON script tag is added in the bootstrap page.
Or read this on Hacker News