Ajax call returning JSON forces IE8 and 7 to download file instead of reading it I have a Drupal 7 site and I'm having this issue, commented here for Drupal 6

The thing is that, when ajax response is set as Content-Type: text/javascript; charset=utf-8 IE 7 and 8 try to download the file. The solution they propose is to change a line in common.inc to declare the response as Content-Type: text/html; charset=utf-8

The solution they propose there means I have to modify Drupal core, I would prefer not to do that as this will be a problem in future Drupal updates.

So, have any of you found this problem? do you know another solution?

PS: When I enter my site, I also find a javascript error in consle saying JQuery is not defined in a lina of drupal.js where it does jQuery.noConflict(); // Allow other JavaScript libraries to use $. I don't think it's related but comment it just in case...

Thank you
I finally located the error: it was because of the file codification, some of them were in UTF-8 and other ones in UTF-8 without BOM so IE7 detected an strange character at the beginning of the json being unable to parse it, coding all files (js files, php and module files) in UTF-8 without BOM solved the problem