What is the correct JSON content type?

Learn about MIME types and how the browser and your JSON code interacts.

By Craig Buckler
November 3, 2016
Screenshot from "What is the correct JSON content type?" Screenshot from "What is the correct JSON content type?"

While the content type is sometimes ignored by an application, it is wise to set it anyways, in case of unforeseen future uses of your code. In this video Craig Buckler distinguishes between the content types required for JSON and JSON-P applications: “application/json” and “application/javascript.” Novice JavaScript developers will better understand MIME types and how the browser and their code interact.

Discover in-depth JavaScript training with our Safari Learning Paths.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more

Craig Buckler is an experienced Web Developer working in the UK who started his career creating desktop software. Craig has worked for a number of well-known companies, including Microsoft, MSN, and Thomson Reuters, as well as the UK & EU governments. Craig is the prolific author of countless articles and tutorials on HTML5, CSS3, JavaScript, JQuery, PHP, and Node.js.

Post topics: Web Programming
Post tags: Questions
Share: