title: Different browser gets different result for jQuery ajax call
body: <p>I am trying to make a $.ajax call but get a different result on different server. </p>
  
  <p>In my js file, I have the following code</p>
  
  <pre><code>function getData () {
      $.ajax({
          async: false,
          type:'GET',
          contentType: "application/json",
          url: 'sample.json',
          dataType: 'json',
          success:function(result){
              alert("successful");
          },
           error: function (xhr, status) {
               alert("failed");
           }
      });
  
  }
  </code></pre>
  
  <p>The js file is included in an HTML file where there is a button with its onclick method as getData(). </p>
  
  <p>My problem is, it will pop up a "failed" alert window if I open the html file in IE or Chrome, but a "successful" window if I open the html in Firefox.</p>
  
  <hr>
  
  <p>Solved:<br>
  I had the problem when trying to run that function from a local html file instead of on a server. And running on server solves the problem.</p>