It would be incredibly helpful for my application to determine if the current browser is set as the default browser.
Is it feasible, utilizing JavaScript, to ascertain whether the browser in which my page is open is the default browser (i.e. the browser that would launch when clicking on a link in another application, such as an email reader)?
Update
In response to E. Sundin and other potential readers, here is the primary reason behind wanting to identify if the current browser is the default:
When a user signs up on one of my websites, I record the User-Agent
as a token that should remain constant from registration to when the user clicks on the email verification link. Regrettably, when users click on the link, it opens in their default browser.
If I could determine this, there are several actions I could take:
- Omit including a link in the email and instead prompt the user to manually input the token in their currently active browser
- Notify the user during registration that following the link won't work if they simply click on it (if I can establish that the browser isn't the default)
- Possibly disregard this test altogether (this could be configured by an admin. In most cases, website owners might not prioritize this as much... so lacking this test would align with the majority of websites out there. Although security may be reduced, given the common practice of omitting this step...)
Naturally, there are instances where individuals sign up on their phone, receive the email on their computer, and try to access the link from there. This scenario wouldn't be ideal with such a test in place...