Is the MIME type ‘image/jpg’ the same as ‘image/jpeg’?

No, image/jpg is not the same as image/jpeg. You should use image/jpeg. Only image/jpeg is recognised as the actual mime type for JPEG files. See https://www.rfc-editor.org/rfc/rfc3745, https://www.w3.org/Graphics/JPEG/ . Serving the incorrect Content-Type of image/jpg to IE can cause issues, see http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm.

Why is mime_content_type() deprecated in PHP?

The method is not deprecated! It once was incorrectly marked as deprecated in the manual, but it has been fixed https://bugs.php.net/bug.php?id=71367 on the 14th of January 2016. However, at the moment, it is still incorrectly marked deprecated in the German, Spanish and Chinese manual. Feel free to use mime_content_type() whenever you like :).

Which JSON content type do I use?

For JSON text: application/json The MIME media type for JSON text is application/json. The default encoding is UTF-8. (Source: RFC 4627) For JSONP (runnable JavaScript) with callback: application/javascript Here are some blog posts that were mentioned in the relevant comments: Why you shouldn’t use text/html for JSON Internet Explorer sometimes has issues with application/json A rather … Read more

What is the boundary parameter in an HTTP multi-part (POST) Request?

To quote from the RFC 1341, section 7.2.1, what I consider to be the relevant bits on the boundary parameter of the Content-Type header (for MIME): All subtypes of “multipart” share a common syntax … The Content-Type field for multipart entities requires one parameter, “boundary”, which is used to specify the encapsulation boundary. The encapsulation … Read more