The Server Gives a File a Type as Well as a Name

Illustrated stack of abstract image cards with smooth and pixelated patterns
AI-generated conceptual illustration, not a product photograph or software screenshot.

A web address ends in a familiar extension, yet the browser handles the response unexpectedly. The visible filename is not the only information involved.

Look at the declared media type

MDN explains media types, often called MIME types, as labels describing a resource’s format. Web servers communicate this through the Content-Type response header; browsers use it when deciding how to process a response.

For example, image/png describes a PNG image. The label is separate from the name someone gives the file.

Keep the label and the bytes distinct

Changing an extension does not rewrite the underlying data. Likewise, a declared type should match the actual content; a label alone is not a conversion process or a safety guarantee.

If you report a problem, include the address, the action you expected and what the browser actually did. Technical support may ask for response information, but avoid sharing cookies, credentials or private document contents.

Use the distinction to ask better questions

Was the expected resource returned? Does the server describe it appropriately? Can the application read that format? These are separate checks.

Start with why renaming is not conversion if the file itself is confusing. A useful diagnosis follows both the content and the information supplied alongside it.