I want my website to open only in these selected browsers (Chrome, FireFox, Safari, Opera & Edge). Can't figure out how i can make it happen, because the userAgent gives these strings for each browsers mentioned above for desktops or laptops
Chrome: (Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36)
FireFox: (Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0)
Safari: (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36)
Opera: (Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.125)
Edge: (Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45)
Commonality between 4 of them is Chrome and Safari Keywords accept FireFox, but FireFox on android shows Safari keyword in the userAgent string, to see the userAgents strings for all these browsers please go to this link https://www.whatismybrowser.com/guides/the-latest-user-agent/ might get better idea.
Now navigator.userAgent.search / .match / indexOf any of these methods or any other method within the navigator gives no solid or unique Identity of the browser (does't matter either desktop, laptop or mobile devices).
All other not most commonly used browsers also shows Chrome or Safari keywords, either both or at-least one of them in desktops, tabs and mobiles, for example: Samsung devices userAgent string shows Samsung Browser but also Chrome or Safari keywords as well.
So please can anybody help me figure out what could be best script to identify the browser and let my website https://justfortrial.com load on only above mentioned browsers.