Disable Chrome strict MIME type checking
In my case, I turned off X-Content-Type-Options
on nginx
then works fine. But make sure this declines your security level a little. Would be a temporally fix.
# Not work
add_header X-Content-Type-Options nosniff;
# OK (comment out)
#add_header X-Content-Type-Options nosniff;
It'll be the same for apache.
<IfModule mod_headers.c>
#Header set X-Content-Type-Options nosniff
</IfModule>
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.