HTMLAnchorElement.download

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 represent the proposed name of the file. If the name is not a valid filename of the underlying OS, browser will adapt it.

Syntax

var dnload = anchorElt.download;
anchorElt.download = dnload;

 

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'download' in that specification.
Living Standard No change from Document Object Model (DOM) Level 2 HTML Specification

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) ? ? ? (Yes) ?
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) ? ? ? (Yes) ?

Document Tags and Contributors

 Contributors to this page: jpmedley
 Last updated by: jpmedley,