title: Relative vs. absolute urls in jQuery AJAX requests
body: <p>I'm having a hard time getting my AJAX requests to work on a staging server. It all worked fine on my development machine, but as soon as I uploaded it, all my AJAX requests stopped working. I found out that, if I change the relative urls (eg. "index.php") to absolute urls ("<a href="http://example.com/index.php" rel="noreferrer">http://example.com/index.php</a>") the requests work again, but I do not understand why.</p>
  
  <p>Example request:</p>
  
  <pre><code>jQuery.post('index.php', {id: 1234, action: 1, step: 1}, function(data) { /* something */ });
  </code></pre>
  
  <p>This does not work, I does not even show up in the firebug console. The success handler is called though, which is very confusing.</p>
  
  <p>This works just fine:</p>
  
  <pre><code>jQuery.post('http://example.com/index.php', {id: 1234, action: 1, step: 1}, function(data) { /* something */ });
  </code></pre>
  
  <p>Can anybody explain why AJAX requests behave in this way? x_X</p>