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
There are so many little things that can happen when trying to download a file. The inconsistency between browsers alone is a nightmare. I ended up using this great little library. https://github.com/rndme/download
Nice thing about it is that its flexible for not only urls but for client side data you want to download.