As the title mentions, I'm working on a website which uses jQuery. Due to changing user requirements, we now need to let the user download files where before he could only view them. I have the location(url) of the file that needs to be downloaded. Unfortunately I haven't had any luck regarding this as Internet Explorer is being ... well ... Internet Explorer.
My example would be the download of a .xml file. Instead of showing the Save as dialog, it opens in Internet Explorer. For Word files on the other hand, the download is correct.
I have tried using a href with <a target="_blank" href=" + targetUrl + ">
, which didn't help.
Then I tried document.execCommand('SaveAs',true,fileUrl);
which also didn't help.
When looking online, I could find no mention of any working solution which made me question whether or not this is even possible.
So my question would be whether or not you can force IE9 and 11 to show the Save As dialog regardless of user settings or not.