A Server Can Suggest Downloading a File Instead of Displaying It

Illustration of generic cables and devices arranged on a violet desk
AI-generated conceptual illustration, not a product photograph or software screenshot.

Two links lead to similar documents, but one opens in a tab and the other offers a download. The filename is not the only information involved in that behaviour.

Read the response instruction

The Content-Disposition header can indicate inline presentation or an attachment and suggest a filename. Browser settings and other response details may also affect the experience, so one observed download does not establish a universal rule for that extension.

Keep the filename separate from trust

A friendly suggested name does not prove that the file is safe or that its content matches your expectation. Check the source and use the normal protections appropriate to the file. Do not rename an unfamiliar download to make it appear like a different format.

When reporting inconsistent behaviour, record the final URL, response headers and browser context without private tokens. That helps distinguish a site’s delivery choice from a local viewing preference. It also explains why changing a link’s visible text alone may not change what happens when somebody opens it.