I have a very similar requirement specified here.
I need to have the user\'s browser start a download manually when $(\'a#someID\').click();
But
Only seven years later here comes a one line jQuery solution using a form instead of an iframe or link:
$('')
.attr('action', filePath)
.appendTo('body').submit().remove();
I've tested this in
If anyone knows of any downsides with this solution I'd be very happy to hear about them.
Full demo: