#How Current Header(Content-Type)
{"content-type":"text/html; charset=UTF-8"}
Render JSON With this content type
{"content-type":"application/json; charset=UTF-8"}
#Why This can cause incompatibility with some browsers, and even break some server side code that is configured to parse a JSON response and in turn the Response Headers tell it that it is HTML.
- Also, ensure that you response not just to JSON requests, but html requests and render as JSON. Firefox XHR requests come in as HTML but expect JSON