I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
First, why do you want to detect the browser? In times past it was a useful thing to know how to do, but these days it's usually irrelevant, and when it is relevant it's usually better to test for what individual features are available rather than the branding of the browser.
Second, there are a lot of user agents besides the ones you mention, and it's very common for the userAgent property to be spoofed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Two points:
First, why do you want to detect the browser? In times past it was a useful thing to know how to do, but these days it's usually irrelevant, and when it is relevant it's usually better to test for what individual features are available rather than the branding of the browser.
Second, there are a lot of user agents besides the ones you mention, and it's very common for the
userAgent
property to be spoofed.