Worker scripts with wrong MIME type will be blocked from loading with importScripts()

Published: | Categories: DOM, JavaScript, Privacy & Security


Starting with Firefox 67, for security reasons, worker scripts served with a wrong MIME type can no longer be loaded into a worker scope using the importScripts method. A similar change has already been made in Firefox 51 for regular JavaScript files. Make sure your script files are always served with text/javascript or application/javascript.

Update: Firefox 70 has applied the same change to worker scripts loaded with Worker() and SharedWorker(). The title of this post has been updated to clarify the change in Firefox 67 only applies to importScripts().