I want to read json data file from another domain (CORS). This file contain Unicode data, Like:
{"id":21,"name":"پرسپولیس تهران"}
I used JQuery Ajax function like this:
$.ajax({
type: "GET",
cache: false,
url: SDomain + 'XML/TeamXMLCache/' + filename + '.json',
dataType: "json",
contentType: 'application/json; charset=UTF-8',
success: parseXml,
error: function (request, status, errorThrown) {
console.log(request);
console.log(status);
console.log(errorThrown);
}
});
And this work me fine in Chrome 39 but not working in IE11 & FF32.
In IE I get parsererror error.
For more information:
- responseText is:
{"id":21,"name":"~13~HD3 *G1'F"}
- readyState:4
- statusText:"OK"
- status:200
And finally my config file is:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
So please tell me why? I'm not a beginner!
Real sample is: My real sample