What is an HTTP attachment response?


An attachment is a response that will trigger the browser to:

  • download the response file
  • or open it if the operating system application is configured to open this type of file automatically.

How to create an attachment response?

You give the attachment directive via:


Content-Disposition: attachment; filename.jpg
Content-Type: image/jpeg

Discover More
What is the Content-Disposition Header? (HTTP Save as, Email Attachment)

The content-disposition HTTP header indicates to the browser if the resource can be shown in the browser or should be downloaded (ie save as)

Share this page:
Follow us:
Task Runner