Disable Chrome strict MIME type checking

前端 未结 6 1816
青春惊慌失措
青春惊慌失措 2020-11-28 08:10

Is there any way to disable strict MIME type checking in Chrome.

Actually I\'m making a JSONP request on cross domain. Its working fine on Firefox but,

6条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 08:43

    The server should respond with the correct MIME Type for JSONP application/javascript and your request should tell jQuery you are loading JSONP dataType: 'jsonp'

    Please see this answer for further details ! You can also have a look a this one as it explains why loading .js file with text/plain won't work.

提交回复
热议问题