title: IE wants to download returned JSON from Django
body: <p>I have a Django site where one page is doing an AJAX-based file upload (using <a href="http://valums.com/ajax-upload/" rel="nofollow">Valum's file uploader</a>) that returns some info back via JSON.  The way the JSON is returned by Django is...</p>
  
  <pre><code>return HttpResponse( json.dumps( info ), mimetype="application/json" )
  </code></pre>
  
  <p>When trying the page in Firefox, Chrome, and Safari I get the appropriate behavior of the file uploader marking the upload as complete and the data being inserted into a table on the page.  </p>
  
  <p>When testing in IE8 I get incorrect behavior after Django sends the JSON back: a download dialog comes up--which is the JSON text if you save it--and the file uploader continues to think the file is uploading since it has received no response from the server.  IE must be seeing the response and interpreting it as a download rather than passing it to the page's javscript.  Note that I've tried changing the mime to application/javascript and this appeared to make no difference.  Anyone got a fix?</p>