Reputation: 105
I get an idea writing a GreaseMonkey user JavaScript that can detect which is the exactly real download link rather than an advertisement link or something else.
Actually, I find that some real download link is linked to .php
. It's tough to detect it I think.
How could I do that, any ideas?
Upvotes: 0
Views: 410
Reputation: 328574
The only reliable way to do it is to follow the link and check what Content-type
you will find in the header of the response. If you can, try to send a HEAD
request instead of a GET
. That will give you the information you need without actually starting the download.
Upvotes: 2