Resource interpreted as other but transferred with MIME type text/javascript?

MPelletierHomework提出了一个问题:Resource interpreted as other but transferred with MIME type text/javascript?,或许与您遇到的问题类似。

回答者jcampbell1给出了该问题的处理方式:

The most common way to get the error is with the following code:

<img src="" class="blah" />

A blank url is a shortcut for the current page url, so a duplicate request is made which returns content type html. The browser is expecting an image, but instead gets html.

希望本文对你有帮助,欢迎支持JavaScript中文网

原文链接:stackoverflow.com

上一篇:custom-guider
下一篇:Zoom and center a Google Map according to its markers (JavaScript API V3)

公众号

欢迎 JavaScript 爱好者