What are the advantages and disadvantages of serving JSON data as text/javascript compared to the official standard: application/json?

As mentioned in some other question, returning JSON with a text MIME type is neccessary if you want to upload files using the HTML4 method: submit your upload form to an iframe, and get the JSON response by extracting the iframe's innerHTML.

As mentioned in some other question, returning JSON with a text MIME type is neccessary if you want to upload files using the HTML4 method: submit your upload form to an iframe, and get the JSON response by extracting the iframe's innerHTML. With MIME type application/json, browsers will offer to save the JSON instead of displaying it. Personally, I always use text/plain, there is no disadvantage.

– Pacerier Aug 4 '11 at 3:22 You won't have to change your server configuration if you decide to implement uploads one day. Not a big deal for a small website, but for Facebook it sure is. – Pumbaa80 Aug 4 '11 at 17:38 since there isn't a better provided ans i'd do with this – Pacerier Aug 5 '11 at 4:14.

I would say in general, there is no advantage/disadvantage. If you were downloading the code, maybe the browser might try to interpret the mime type. Or if you are building an application using the mime types and want to handle it a certain way.

For purposes of facebook is doing, there wouldn't be any advant/disadvant.

A mime type application would force the browser to save it to disk. Maybe Facebook doesn't want this? But I don't see an advantage or disadvantage.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions