I have a standard file upload script using this script. When the upload is completed, I send back a JSON telling the client that the upload went OK, something like this:
{done: true, error: "No error"}
When I do the upload on Firefox, everything works out smoothly, but on IE9 / Chrome it breaks. IE tells me that I need to download the file, something like this image:

I thought that the issue was the headers submitted to the client and I tried setting the content type to:
- application/javascript
- text/javascript
The files are stored properly and the answer is coming back without any corruption, nor in the encoding, or gzipped or anything like it.
Any ideas?
EDIT: Forgot to add the link on the “this” and also, it’s an older version of the plugin, not the current one.
I’ll reply the question myself because I’ve found a solution, at least it works…
Thing is that when sending a request using an iframe, seems that the content type of the response shouldn’t be either
application/jsonorapplication/javascriptor any other like it. My solution was to send the response astext/html, and do aJSON.parseon the client, and it works like a charm.Since I all of my Ajax calls specify that I expect a JSON, it works ok when I make ajax calls as well, because jQuery handles the whole conversion, only thing that worries me is any problem related to performance on the client, but I see no signs of problem just yet…
Hope that anybody that runs with the problem may find my answer helpful!