My understanding is that if it is a cross-domain request, we are supposed to set dataType to “jsonp”. Which I did, but then it did not work. I got the following error message in the console:
Refused to execute script from ‘http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_p…page]=1&callback=jQuery31105215916043980608_1487877164531&=1487877164532’ because its MIME type (‘application/json’) is not executable, and strict MIME type checking is enabled.
But when I set it to “json”, it worked.
Can anyone explain why?
Here is my code: