Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is any way to download attribute HTML5 work in IE?

Tags:

html

download

Is there any way to download attribute work in IE. When try to force download file under IE using

Following is work fine in Firefox but not under IE

<a href="image.jpg" download>Click to download</a>
like image 452
Muhammad Awais Avatar asked Mar 13 '14 06:03

Muhammad Awais


People also ask

Why my download attribute is not working in HTML?

The download attribute only works for same-originl URLs. So if the href is not the same origin as the site, it won't work. In other words, you can only download files that belongs to that website. This attribute follows the same rules outline in the same-origin policy.

How does HTML download attribute work?

The download attribute specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink. The optional value of the download attribute will be the new name of the file after it is downloaded.

How do I download using anchor tag?

Approach 1: Using Download attribute The download attribute simply uses an anchor tag to prepare the location of the file that needs to be downloaded. The name of the file can be set using the attribute value name, if not provided then the original filename will be used.

Is there any tag in HTML to upload and download files?

<a> is the link tag. href attribute sets the file to download.


1 Answers

As of now IE doesn't support download attribute, even the latest version. Some jquery plugins are available to make HTML5 tags work in IE older versions. You can give a try. Even safari also doesn't support.

You can check the full details on browsers compatibility for download attribute here

http://devble.com/set-filename-downloaded-file/

like image 135
Mandava Avatar answered Sep 29 '22 06:09

Mandava