Quick (and hopefully easy) question: I need to trigger a download of a PDF file that's generated by a PHP file. I can do this:
<a href="download.php">Download</a>
but should I be doing this another way? Javascript maybe? The above works but the window shows "Loading..." until the download starts. I'd like to provide some feedback to the user that something is happening.
Ideas?
Note: I already have the code that sends the file from the server. It works perfectly. This question is simply about how best to call that script from the client.
Some sites have downloads that automatically start. How do they do that?
The problem with a direct URL is that if the PHP script errors it'll replace th econtent of the existing page, which is not what I want.