Most of the time, single threaded JavaScript preloading is just fine. But what happens when you have some complex animations during a preload ? If it runs on the UI thread, it’ll causes some troubles like freeze. MM.Loader creates a Web Worker to preload your assets with XHR and simply dispatches the response. MM.Loader was inspired by PreloadJS.
PreloadJS makes preloading assets & getting aggregate progress events easier in JavaScript. It uses XHR2 when available, and falls back to tag-based loading when not.
This demo simply preloads a large asset (16MB) to check if it causes some troubles during animations.
Tested in Chrome. Check on Can I use if your browser supports Web Workers.