title: How can I do a synchronous request with jQuery?
body: <p>Why don't return that function the responseText?</p>
  
  <pre><code>function LoadBookmarksAsXml()
  {
    return $.ajax(
    {
      type: 'GET',
      async: false,
      url:  'http://www.google.com/bookmarks/?output=xml&amp;num=10000'
    }).responseText;
  }
  </code></pre>
  
  <p>(It works if I define a success-callback-function and set async to true!)
  Thanks in advance!!</p>
  
  <p><strong>Edit</strong>: Don't worry about the cross-domain call; user603003 says (in a comment on a now-deleted answer) that this is in a Chrome extension where cross-domain requests are allowed.</p>
  
  <p><em><strong>The solution if someone wants to do the same:</em></strong></p>
  
  <pre><code>return $.ajax(
  {
    type: 'GET',
    async: false,
    url:  'http://www.google.com/bookmarks/?output=xml&amp;num=10000',
  });
  </code></pre>
  
  <p>(You will get a XMLHTTPRequest object.)</p>