Web/API/HTMLAnchorElement/download

From Get docs


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

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
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