Compatibility is not very good,
Just to get a look:
The main performance in the cross-domain policy processing, Chrome browser and Firefox browser:
If the resources that need to be downloaded are cross-domain , including cross-subdomain, under Chrome, the use of download
properties is downloadable, however, and cannot reset the name of the downloaded file, and under the Firefox browser, the download
property is invalid, That is, the Firefox browser does not support the cross-domain resource's download
attribute download anyway.
And, if the resource is the same domain name, then two browsers are unimpeded download, do not appear to download the situation of browsing.
Demo
<href= "large.jpg" download> download </a >
Not only that, we can also specify the file name of the downloaded image:
<href= "index_logo.gif" download= "_5332_.gif" > Download </a>
If the suffix name is the same, we can also default, the direct file name:
<href= "index_logo.gif" download= "_5332_"> Download </ a >
In addition to the image resources, we can also be a PDF resource, or TXT resources and so on. In particular, chrome and other browsers can open the PDF file directly, so that the file format needs to download
deal with the scene more and more common
The Download property in HTML/HTML5