Right now I have <a href="...">FILE</a> to allow users to download a file. I don’t like that because it forces them to leave the current page and have to reload it (which takes a few seconds) when they want to go back
What is the easiest way to have users download a file?
Have the server send a
Content-Disposition: attachmentheader for the resource in question. It’ll then be presented to the user (if they have a sane browser) as a file to “save”, rather than as a new page.For certain types of resources this may mean you write a proxy script in PHP, or perhaps you can configure your webserver to do it.