The HTMLAnchorElement.download
property is a DOMString
indicating that the linked resource is intended to be downloaded rather than displayed in the browser. The value, if any, specifies the default file name for use in labeling the resource in a local file system. If the name is not a valid file name in the underlying OS, the browser will adjust it.
Note: This value might not be used for download. This value cannot be used to determine whether the download will occur.
Syntax
var dnload = anchorElt.download; anchorElt.download = dnload;
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'download' in that specification. |
Living Standard | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
download | Chrome Full support 14 | Edge Full support 13 | Firefox Full support 20 | IE ? | Opera Full support 15 | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support 18 | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android Full support 1.0 |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown