A media type identifies file formats on the Internet. It consists of a type, subtype, optional suffix and parameters. For example, text/html; charset=UTF-8. Knowing media types helps verify if file co...
A media type identifies file formats on the Internet. It consists of a type, subtype, optional suffix and parameters. For example, text/html; charset=UTF-8. Knowing media types helps verify if file contents match extensions. Attackers can disguise harmful files. Here’s a list of media types and associated extensions.
The structure is type/subtype without spaces. Media types are case insensitive. A type has a set of possible subtypes. Parameters provide additional details. Types are discrete or multipart, with subtypes.
Browsers use the media type over file extension to process URLs. So servers should send the right media type in responses.