Content-Disposition
Indicates whether the response should be displayed inline or downloaded as a file attachment.
Syntax
Content-Disposition: inline | attachment; filename="<filename>"
Example
Content-Disposition: attachment; filename="report-2026-03.pdf"
Description
The Content-Disposition header controls how the browser handles a response. With inline, the browser displays the content. With attachment, the browser triggers a file download, optionally using the provided filename.
It is also used in multipart form data to describe form fields. For security, always sanitise the filename to prevent path traversal attacks.
How real sites send this header
Home-page responses of 503 popular sites from the enterno.io /check catalogue, checked in the last 30 days.
3.6%
(18 of 503) send Content-Disposition.
Most common values:
inline— 18 sites
See it on: vercel.com, nextjs.org, auth0.com, react.dev, svelte.dev
Check if your website sends this header correctly
Check your headers →