我的问题是 here 的半价延续.
在我的页面中我有:
<script type='text/javascript' src='https://www.dropbox.com/....'>
并试过这两个都得到相同的错误信息
<script src='https://www.dropbox.com/.....'>
错误:
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.
最佳答案
只是猜测,因为您没有告诉我们您使用的链接类型,但也许您使用的是“共享链接”(www.dropbox.com/s/...)。
当您获得共享链接时,该链接指向显示内容的网页。要获取原始内容,请使用 ?raw=1
。参见 https://www.dropbox.com/help/201 .
请注意,此类链接需要在浏览器中进行重定向,这会减慢您的页面加载速度。 Dropbox 上的共享链接也有带宽限制。正如 Limnic 所建议的,您可能希望使用某种托管服务。
关于javascript - Dropbox:MIME 类型 ('text/html' ) 不可执行,并且已启用严格 MIME 类型 > 检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32356241/