3

This fiddle is not working in firefox but working in chrome.

I have tried using this :

Click on the w3schools logo to download the image:

Note: The download attribute is not supported in IE, Safari or Opera version 12 (and earlier).

Link to fiddle : JsFiddle

user3727204
  • 45
  • 1
  • 1
  • 6

1 Answers1

8

first of all in firefox, you cant mark an a element to download from another domain so an a like this wont work

    <a href="http://www.w3schools.com/images/myw3schoolsimage.jpg" download>

but this other will work on firefox

    <a href="img/book.png" download>

Firefox need to be from the same domain, so a relative url, will work fine.

:) goog luck

HadesDX
  • 148
  • 6
  • 4
    note that it should work on remote urls in FF if the server emits CORS headers. – dandavis May 25 '15 at 19:37
  • @dandavis I've added CORS headers, with * for origin, and I can see them coming back to the browser, but it has made no difference. – Antony Nov 21 '17 at 21:40
  • Searching around some more, found a confirmation that this is not possible with FF: https://stackoverflow.com/questions/28318017/html5-download-attribute-not-working-when-downloading-from-another-server-even – Antony Nov 21 '17 at 21:46
  • 1
    I just tested it, and it seems to be broken now in Firefox. – Jan-Luca Klees Apr 05 '22 at 11:14