Resource interpreted as other but transferred with

2019-03-09 12:50发布

I keep getting "Resource interpreted as other but transferred with MIME type text/javascript.", but everything seems to be working fine. This only seems to be happening in Safari 4 on my Mac.

I was advised to add "meta http-equiv="content-script-type" content="text/javascript" to the header, although that did nothing.

7条回答
走好不送
2楼-- · 2019-03-09 13:33

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.

查看更多
登录 后发表回答