Is there a way in javascript to check if magnet link is supported by browser (= to check if torrent client is installed on user's pc)?
I want to check via javascript if browser opens torrent client by clicking on magnet link or I need to show some additional instructions (if torrent client is not installed).
Being a Browser, it has no access to installed applications in the OS, but what it does have is access to a list of supported MIME types.
In JavaScript you can check it as follows:
Thanks to this previously asked question.
Here is a fiddle The MIME type I use is application/x-bittorrent
EDIT: As pointed out by @HaukurHaf, this will only work if the client has an extension installed for torrents in the browser itself. So this might or might not return true for some clients.
No, not with javascript. Imagine if plain javascript could check what software users have installed on their machines. That would be a huge security risk.