I am creating a script to keep download statistics, but I would only like to update the stats if the file was ACTUALLY downloaded.
The problem is that browsers (e.g., Explorer 9, Chrome, ...) automatically start downloading the file while the 'save/open' dialog is still open. This means the file can completely download (into a browser specified temp directory I assume) before the user has specified where to save it (or while Explorer still shows the Yellow warning bar).
The user may decide to cancel the save, even though the file was successfully downloaded. How can I tell browsers not to automatically start downloading? Some HTTP header perhaps? Any other solutions?