Internet Explorer treating AJAX GET request as POST request?

Posted by Matt Huggins on Stack Overflow See other posts from Stack Overflow or by Matt Huggins
Published on 2010-05-24T20:57:43Z Indexed on 2010/05/24 21:01 UTC
Read the original article Hit count: 193

Filed under:
|
|
|
|

For some reason, only in IE (tried 7 & 8), jQuery is performing a POST request when it should be a GET. See below:

function(...) {
  /* ... */
  $.ajax({
    type: 'GET',
    dataType: 'script',
    url: '/something/' + id,
    processData: false,
    data: 'old_id=' + oldId,
    success:function(data) {
      alert(data);
    }
  });
  /* ... */
}

All browsers properly GET, but IE is performing a POST. Why?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX