title: jQuery AJAX not working using IE
body: <p>I have seen lots of other people with this problem all over SO and elsewhere but none of the given solutions seem to work for me.</p>
  
  <p>I have a jQuery AJAX call to an ASHX handler.  The code works in Firefox and Chrome but not in IE (versions 8, 9 or 10).</p>
  
  <p>It looks like so (simplified):</p>
  
  <pre><code>var val = $(this).val();
  
  $.ajax({
      url: '/Source/Handlers/Search.ashx?q=' + val,
      type: "GET",
      cache: false,
      dataType: 'json',
      error: function(w,t,f) {
           alert(w + "\n" + t + "\n" + f);
      },
      success: function (data) {
           ...
      }
   });
  </code></pre>
  
  <p>When I run the code in IE the error handler kicks in and says </p>
  
  <pre><code>[object Object]
  error
  error
  </code></pre>
  
  <p>Useful huh?</p>
  
  <p>The ASHX handler is like this (again it is simplified):</p>
  
  <pre><code>public class Search : IHttpHandler
  {
      public void ProcessRequest(HttpContext context)
      {
          context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
          context.Response.ContentType = "application/json";
          context.Response.Buffer = false;
  
          JavaScriptSerializer serializer = new JavaScriptSerializer();
          List&lt;Suggestions&gt; jsonResponse = new List&lt;Suggestions&gt;();
  
          // do some stuff
  
          context.Response.Write(serializer.Serialize(jsonResponse));
      }
  }
  </code></pre>
  
  <p>I have tried swapping "GET" for "POST", I have tried enabling and disabling the "cache" property, I have tried different dataType settings such as "json", "xml" and "text".</p>
  
  <p>Using HTTP Fiddler I can see that the json response does come back but IE doesn't seem to be able to process it.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is the JSON response in TextView from HTTP Fiddler:</p>
  
  <pre><code>543
  [{"title":"GAMES","results":[{"title":"abcdefg™","link":"http://www.abcdefg.com/en_gb/abcdefg/","image":"/uploadedImages/abcdefg/games/1-Game_Folder_Master(1)/Config/abcdefg(1).jpg","total":""},{"title":"abcdefg","link":"http://www.abcdefg.com/en_gb/abcdefg","image":"/uploadedImages/abcdefg/games/1-Game_Folder_Master(1)/Config/abcdefg.jpg","total":""},{"title":"abcdefgg","link":"/Retailers/?game=1432&amp;amp;platform=0","image":"/uploadedImages/abcdefg/games/1-Game_Folder_Master(1)/Config/abcdefg.jpg?n=9736","total":""},{"title":"abcdefg","link":"http://www.abcdefg.com","image":"/uploadedImages/abcdefg/games/1-Game_Folder_Master(1)/Config/abcdefg.jpg","total":""},{"title":"abcdefg","link":"/Retailers/?game=1763&amp;amp;platform=0","image":"/uploadedImages/abcdefg/games/1-Game_Folder_Master(1)/Config/abcdefg_promo.jpg","total":""}],"total":"24","link":"/Search/?q=total"},{"title":"MEDIA","results":[{"title":"Videos","link":"/Search/?q=total","image":"","total":"1"},{"title":"Screenshots","link":"/Search/?q=total","image":"","total":"35"}],"total":null,"link":null}]
  0
  </code></pre>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Hmmm, I updated the $.ajax call to alert w.status and it returned "404". Confused - how can it return 404 in the status when Fiddler shows the response as 200?</p>