2

I try to make a image download button that works correctly in all browsers(ie8+) and i try this codes:

<!-- don't work with IE and Safari -->
<div>
    <a href="/image.jpg" download>Download</a>
</div>

and

<!-- this code don't work at all -->
<div>
    <iframe width="1" height="1" frameborder="0" src="/image.jpg"></iframe> 
    Download
</div>

according to this question

Community
  • 1
  • 1

2 Answers2

2

The download attribute is part of HTML5, and won't work in legacy browsers. If you want to force an image download you would need to do something server-side to serve the image in binary format with the correct MIME type.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
-1

The download attribute are not supported in IE8. You can see which browsers that supports it here.

http://caniuse.com/#feat=download

user2952238
  • 749
  • 2
  • 11
  • 36