JavaScript served with wrong MIME type will be blocked

Published: | Categories: JavaScript, Privacy & Security


On Firefox 51 and later, JavaScript files served with a wrong MIME type such as image/*, audio/*, video/* or text/csv will not be loaded for security reasons, raising a NetworkError. The HTML <script> element, new Worker(), new SharedWorker() as well as the importScripts method are all affected. Make sure your script is served with an appropriate type such as text/javascript or application/javascript.