0

I just checked some SO post they described <a href="path/to/file" download>Click here to download</a> is working almost every browser, Yes but not with Firefox. I tried with Chrome and Edge working perfectly but not with Firefox. how can i solve this any idea would be appreciated Thank you

N:B: I followed this link but no luck Javascript-Force Browser to download

Community
  • 1
  • 1
Code Cooker
  • 881
  • 14
  • 19

1 Answers1

0

I have done some research and found the best answer. You can trigger a download by using the new HTML5 download attribute.

Where : path_to_file is either an absolute or relative path, proposed_file_name the filename to save to (can be blank, then defaults to the actual filename).

<a href="path_to_file" download="proposed_file_name">Download</a>

Hope this is helpful.