0

I have a file .exe on apache server into a folder and I try to download it using simple html and javascript but it is not working, I'm trying with this methods

<a href="folder/myfile.exe" target="_blank">Download</a>

Even with javascript

window.location = "folder/myfile.exe";

I tried with differents files including images, .txt, etc and it works well, the problem is with .exe is just show a blank page or keep loading, there is a specific way to make .exe downloable?, I'm using Chrome

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Fixer
  • 175
  • 1
  • 2
  • 16
  • if you rename it to zip, does it still download? – TankorSmash Feb 23 '17 at 23:58
  • @TankorSmash yes, it works well with .zip or .rar but I need to use .exe – Fixer Feb 24 '17 at 00:00
  • You'd think that for security reasons, browsers may block the download of .exe files. Yes I remain wondering, how come I can download .exe files from some websites ? Maybe it requires HTTPS... have you taken a look at this SO question : http://stackoverflow.com/questions/1502960/how-can-i-get-browsers-to-download-an-exe-instead-of-opening-it-in-the-browser-w ? – Mouradif Feb 24 '17 at 00:06
  • Have you tried other browsers then? That would help narrow down if it is a server or a browser issue. – mherzig Feb 24 '17 at 00:21
  • Do you have any antivirus software or browser extensions running? – j08691 Feb 24 '17 at 02:45
  • @j08691 antivirus maybe on the server but I'm not really sure – Fixer Feb 24 '17 at 17:09
  • @mherzig yes I tried with firefox and internet explorer but was the same problem – Fixer Feb 24 '17 at 17:19

0 Answers0