Details
-
Suggestion
-
Resolution: Fixed
-
None
-
Any
Description
JsonResult returns a response with a content-type of text/javascript (was previously application/javascript) but according to the IETF JSON specification it should be "application/json".
This content-type is what jQuery treats as JSON if a dataType isn't specified - text/javascript is treated as JavaScript code that will successfully run when embedded in a <script> tag. Passing a JSON into a <script> causes errors in some browsers (i.e. IE).
See http://api.jquery.com/jQuery.ajax for jQuery's description of the dataType option - the default is "Intelligent Guess".
Attachments
Issue Links
- causes
-
CONFSERVER-20206 Removing a page watcher in IE throws a javascript error
- Closed