Download file from link javascript

10 Jul 2018 Sometimes we find ourselves having to handle a file download in a less conventional (or ideal) way. Instead of having a 'download URL' or 

File Download via AJAX. A Pen By Chris Pratt PRO. Pen Editor Menu. Love Fork Fold All; Unfold All. 1. 1. . And so…WP-TwitterBadge was born.

By clicking on a link you download a dynamically-generated Blob with hello world contents as a file: