My problem is as follows:
I serve a webpage to clients that contains two different download links to the same file. I want the client(!) to test both without manually clicking both links (I still present them both as a fail safe). Can this be done with javascript or html5?
What you can do is making an HTTP
HEADrequest and look at the status code. The status code tells you whether the resource is available, while aHEADrequest does not fetch the resource contents itself.This can be done with AJAX, depending on your framework.
E.g. with jQuery: