Skip to content

Errors / Blocked by the browser

Refused to execute script from '…' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

The browser asked for a script and got something else, so it would not run it.

That script never runs.

Why it happens

  • The script's URL answers an HTML page: a 404 page, a login page, or a single-page app's index.html for every path.
  • A server that sends .js files with the wrong Content-Type, or a proxy rewriting it.
  • X-Content-Type-Options: nosniff (a good header) makes the browser strict about it.

How to fix it

  1. Open the script URL directly: HTML there means a wrong path or a deleted file; fix the reference, and make missing assets answer 404.
  2. Serve JavaScript as text/javascript (.mjs included); check the host's MIME configuration.

Whose problem it is

Usually the site's own code or settings.

Does your site have it?

Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.

Check only sites you run or have permission to check.

Often seen with

  • Unexpected token '<'The browser asked for a script and got a web page instead, usually an error page or the home page.
  • 404 Not FoundThe server has nothing at this address: a page or file that was moved, deleted, or never existed.