Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify content-type for json response #748

Merged
merged 1 commit into from Aug 17, 2015
Merged

Conversation

@ollie314
Copy link
Contributor

@ollie314 ollie314 commented Aug 17, 2015

The MIME media type for JSON text is application/json. (Source: RFC 4627 - http://www.ietf.org/rfc/rfc4627.txt).
According to the rfc, the media type must be 'application/json' instead of 'text/json'. Standard browser (ie: webkit, geko), extensions and libraries automatically recognize application/json MIME media type.
Note : The default encoding is UTF-8. (as specified in the rfc). So no changes regarding the encoding is needed.
Note: I would mention that this isn't a mandatory but it is a rules from rfc.
Another point to underline. Sometimes, we have an issue on IE (don't know which version) with application/json. The MIME should be 'text/javascript'. A patch may be necessary for this case.

The MIME media type for JSON text is application/json. (Source: RFC 4627 - http://www.ietf.org/rfc/rfc4627.txt).
According to the rfc, the media type must be 'application/json' instead of 'text/json'. Standard browser (ie: webkit, geko), extensions and libraries automatically recognize application/json MIME media type.
Note : The default encoding is UTF-8. (as specified in the rfc). So no changes regarding the encoding is needed.
Note: I would mention that this isn't a mandatory but it is a rules from rfc.
Another point to underline. Sometimes, we have an issue on IE (don't know which version) with application/json. The MIME should be 'text/javascript'. A patch may be necessary for this case.
maskas added a commit that referenced this pull request Aug 17, 2015
Modify content-type for json response
@maskas maskas merged commit ef0feab into impresspages:develop Aug 17, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@maskas
Copy link
Member

@maskas maskas commented Aug 17, 2015

+1

maskas added a commit that referenced this pull request Dec 22, 2016
Modify content-type for json response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.