JoshE Posted July 16, 2020 Share Posted July 16, 2020 Site URL: https://www.goodbeerhunting.com I'm getting the error Refused to execute script from 'https://www.goodbeerhunting.com/dynamic/1234kdjeld?format=json&callback=jQuery1111035353247486359707_1594910433540&_=1594910433541' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled. I'm not sure what changed or why the MIME type is no longer executable. Anyone else having this type of issue? My code in the js file looks like this: $.getJSON('//goodbeerhunting.com/dynamic/1234kdjeld?format=json&callback=?', function(data) { children.forEach(function(item){ var content = $(data.mainContent).find('.' + item); $('.ddd-' + item).replaceWith(content); }); }); I tried adding this: $.ajaxSetup({ scriptCharset: "utf-8", contentType: "application/json; charset=utf-8" }); And that made the error message go away, but it didn't fix the issue and allow the correct info to display on the page. Any help is appreciated. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment