title: Empty AJAX response Chrome / Safari
body: <p>I have a jQuery function which autofills an input field using the Google autocomplete API. Basically, an AJAX request is made to an PHP file which uses file_get_contents() to return JSON back to the application, and then upon success the results are displayed. Easy enough.</p>
  
  <p>However, I seem to be having a problem displaying the results with both Chrome and Safari. The results is just blank, though behaves as if it has been successful in that it follows through with the callback function sans the JSON data. If I replace file_get_contents() with something simple, like printing "Hello", then the text come backs successfully.</p>
  
  <p>I have tries adding a header to the offending PHP file, and I have tried adjusting the url from relative to absolute. Nothing seems to work, and it is starting to drive me crazy.</p>
  
  <p>My ajax request looks like this:</p>
  
  <pre><code>$.ajax({
    type: 'GET',
    headers: {'cache-control': 'no-cache'},
    cache: false,
    url: 'http://www.example.com/ajax/locations.php',
    data: {data: input},
    async: false,
    dataType: 'text',
    success: function(a){
     - do something with a -
    }
  });
  </code></pre>
  
  <p>Any ideas or suggestions would be very much appreciated.</p>