download
slinky.web.html.download$
area - This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource. See <a>
for a full description of the download
attribute.
a - This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though /
and </code> are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.
Notes:
- This attribute only works for same-origin URLs.
- This attribute can be used with
blob:
URLs anddata:
URLs to download content generated by JavaScript, such as pictures created in an image-editor Web app. - If the HTTP header
Content-Disposition:
gives a different filename than this attribute, the HTTP header takes priority over this attribute. - If
Content-Disposition:
is set toinline
, Firefox prioritizesContent-Disposition
, like the filename case, while Chrome prioritizes thedownload
attribute.
Attributes
- Graph
- Supertypes
- trait Attrclass Objecttrait Matchableclass Any
- Self type
- download.type