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 StandardThe 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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
download
|
Chrome
Full support 14 |
Edge
Full support 13 |
Firefox
Full support 20 |
IE
No support No |
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
- No support
- No support
- Compatibility unknown
- Compatibility unknown
HTMLAnchorElement.download by Mozilla Contributors is licensed under CC-BY-SA 2.5.