We want to allow a user to download a picture via a button from our website. We've got the basic download working ok (it saves it to the disk) but we do it by opening up a new window...
window.open('mypicture', '_blank');
Unfortunately this creates a new tab in Chrome which does not go away. We don't have the most sophisticated users and they might become confused if the screen suddenly goes blank.
We tried it with...
location.href='mypicture'
This works great in IE, but in Chrome it just ignores the download completely.
Is there any other way to force download the picture without opening a new window?