Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
MIME
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Content-Disposition=== The original MIME specifications only described the structure of mail messages. They did not address the issue of presentation styles. The content-disposition header field was added in RFC 2183 to specify the presentation style. A MIME part can have: * an ''inline'' content disposition, which means that it should be automatically displayed when the message is displayed, or * an ''attachment'' content disposition, in which case it is not displayed automatically and requires some form of action from the user to open it. In addition to the presentation style, the field ''Content-Disposition'' also provides parameters for specifying the name of the file, the creation date and modification date, which can be used by the reader's mail user agent to store the attachment. The following example is taken from RFC 2183, where the header field is defined: Content-Disposition: attachment; filename=genome.jpeg; modification-date="Wed, 12 Feb 1997 16:29:51 -0500"; The filename may be encoded as defined in RFC 2231. As of 2010, a majority of [[email client|mail user agents]] did not follow this prescription fully. The widely used [[Mozilla Thunderbird]] mail client ignores the ''content-disposition'' fields in the messages and uses independent algorithms for selecting the MIME parts to display automatically. Thunderbird prior to version 3 also sends out newly composed messages with ''inline'' content disposition for all MIME parts. Most users are unaware of how to set the content disposition to ''attachment''.<ref name="Giles Turnbull">{{Cite web|url=http://www.oreillynet.com/mac/blog/2005/12/forcing_thunderbird_to_treat_o.html |title=Forcing Thunderbird to treat outgoing attachments properly |access-date=2010-04-01 |author=Giles Turnbull |author-link=Giles Turnbull | date=2005-12-14 |publisher=O'Reilly mac devcenter}}</ref> Many mail user agents also send messages with the file name in the ''name'' parameter of the ''content-type'' header instead of the ''filename'' parameter of the header field ''Content-Disposition''. This practice is discouraged, as the file name should be specified either with the parameter ''filename'', or with both the parameters ''filename'' and ''name''.<ref name="ned+ietf-smtp">{{Cite web|url=https://mailarchive.ietf.org/arch/msg/ietf-smtp/KtN0TdoHDayKvKycNbsFD-GB-e4|title=name and filename parameters|date=2008-06-22|access-date=2017-04-03|author=Ned Freed|author-link=Ned Freed}}</ref> In HTTP, the response header field ''Content-Disposition: attachment'' is usually used as a hint to the client to present the response body as a downloadable file. Typically, when receiving such a response, a [[Web browser]] prompts the user to save its content as a file, instead of displaying it as a page in a browser window, with ''filename'' suggesting the default file name.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)