title: getting Refused to execute script from '*' because its MIME type ('application/json') is not executable, and strict MIME type che
body: <p>Please find below my code to get response from <code>confluence rest api</code>:</p>
  
  <pre><code>&lt;script type="text/javascript" src="Scripts/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $.ajax({
          type: "GET",
          url: "https://blog.xxxxx.com/rest/api/content?type=blogpost&amp;spaceKey=xxxxx&amp;expand=space,body.view,version,container",
          contentType: "application/json; charset=utf-8",
          dataType: "jsonp",
          jsonp: 'jsonp-callback',
          async: false,
          success: function (result) {
              console.log(result);
          },
          error: function (xhr, errorText) {
              console.log('Error ' + xhr.responseText);
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I referred <a href="https://stackoverflow.com/questions/24528211/refused-to-execute-script-from-because-its-mime-type-application-json-is">this</a> <a href="https://stackoverflow.com/questions/25140050/refused-to-execute-script-from-because-its-mime-type-application-json-is">and this</a> as reference but it did not resolve my isse. I am getting error on console <code>Refused to execute script from 'https://blog.xxxxx.com/rest/api/content?type=blogpost&amp;spaceKey=xxxxx&amp;…d=space,body.view,version,container&amp;callback=jsonpCallback&amp;_=1413187692508' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled</code>.</p>
  
  <p>I tried with <code>type:post</code>, <code>dataType:json</code> and <code>dataType:jsonp</code> with <code>jsonp: jsonp-callback</code>. None of these worked for me.</p>
  
  <p>In <code>Network</code> tab of chrome developer tools I am getting resposne from <code>confluence</code> but it does not print the same on console or on page.</p>
  
  <p>If I use <code>dataType:json</code>, I am getting an error <code>XMLHttpRequest cannot load https://blog.xxxxx.com/rest/api/content?type=blogpost&amp;spaceKey=xxxxx&amp;expand=space,body.view,version,container. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost' is therefore not allowed access</code> on chrome.</p>
  
  <p><strong>Update</strong>
  Adding mime type <code>application/json</code> for <code>json</code> in IIS does not work.</p>
  
  <p><strong>Updated  code</strong></p>
  
  <pre><code>$.ajax({
              type: 'GET',            
              url: 'https://blog.xxxxx.com/rest/api/content?type=blogpost&amp;spaceKey=xxxxx&amp;expand=space,body.view,version,container',   
              dataType: 'jsonp',
              xhrFields: {                
                  withCredentials: false
              },
              headers: {
                  "Accept" : "application/json; charset=utf-8",
                  "Content-Type": "application/javascript; charset=utf-8",
                  "Access-Control-Allow-Origin" : "*"
              },
              success: function (result) {
                  $('#blog').html(result);
              },
              error: function (xhr, errorText) {
                  console.log('Error ' + xhr.responseText);
              }
          });
  </code></pre>
  
  <p>Still getting the same error.</p>
  
  <p><strong>Response Body</strong></p>
  
  <pre><code>results: [{id:3342352, type:blogpost, title:The stocks that are set to fly (or crash),…},…]
  0: {id:3342352, type:blogpost, title:The stocks that are set to fly (or crash),…}
  1: {id:3833861, type:blogpost, title:Before earnings season, it's downgrade season,…}
  2: {id:3833876, type:blogpost, title:Petrobras - what goes up, must come down,…}
  3: {id:3833882, type:blogpost, title:Fishing for Income in the FTSE 100,…}
  4: {id:4489219, type:blogpost, title:A Ray of Light Among the Gathering German Gloom,…}
  5: {id:4489234, type:blogpost, title:Insider trading falls as buybacks dominate share prices,…}
  6: {id:4489241, type:blogpost, title:El Clasico: Nike vs Adidas,…}
  7: {id:4489248, type:blogpost, title:Dollar uncertainty exposes investors' complacency,…}
  8: {id:4489254, type:blogpost, title:Worst yet to come for the Australian miners,…}
  9: {id:4489258, type:blogpost, title:Using Aggregate List Views to Find Lurking Risks,…}
  size: 10
  start: 0
  </code></pre>
  
  <p><strong>How do I reolve the issue of <code>MIME type ('application/json') is not executable, and strict MIME type checking is enabled</code> in <code>confluence rest api</code> ???</strong></p>