Search code examples
javascriptdropboxmime-types

Dropbox: MIME type ('text/html') is not executable, and strict MIME type > checking is enabled


my question is half off continuation from here.

in my page I have:

<script type='text/javascript' src='https://www.dropbox.com/....'>

and tried this both get the same error message

<script src='https://www.dropbox.com/.....'>

error:

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


Solution

  • Just a guess, since you haven't told us what kind of link you're using, but perhaps you're using a "share link" (www.dropbox.com/s/...).

    When you get a share link, the link points to a web page that displays the content. To get the raw content, use ?raw=1. See https://www.dropbox.com/help/201.

    Note that this sort of link will require a redirect in the browser, which will slow down your page load. Share links on Dropbox also have bandwidth limits. You may want to, as Limnic suggested, use a hosting service of some sort.