Best content type to serve JSONP? Best content type to serve JSONP? javascript javascript

Best content type to serve JSONP?


Use application/javascript. In that way, clients can rely on the content-type without having to manually check whether a response has padding or not.


Use application/json as per rfc4627.txt if what you return is plain JSON.

If you return JavaScript (which is really what JSONP is), then use application/javascript as per rfc4329.txt