This way I can download the file from the localhost / server where the site is hosted. But I will have to download files from the remote server in We have come across Download file link(button) in lot of sites. The server will set Content-disposition header to attachment; filename=some-filename.csv HTML.