I was trying to implement Download link in my application. Simply I was giving link of my file in anchor tag and trying to download. But instead of downloading that file from server to my local system , It was opening the file in browser itself. I tried for image, .txt file but I was not able to download.Check out screenshots. If browser is capable of opening files then it might open it instead of downloading if you simply provide link of file. You have explicitly write script to download file forcefully instead of opening it.