function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roseanne Miller 16Roseanne Miller 16 

browser recognition

Hi, I'm looking to see if there is any apex code using a user agent string from a browser that will identify what browser the user is using to log into Salesforce with.  I need to have a pop up message that will direct the user to use Google Chrome.  Is that possible? 

Regards
Roseanne
Chris Gary CloudPerformerChris Gary CloudPerformer
Salesforce actually already logs all of the User-Agent Strings as well as a bunch of other information when a user logs in, unfortunately, User-Agent is not a setting that you can restrict or even change login behavior based on. Couple of alternative suggestions:
1. Set up My Domain login - and then customize the login page to display the message BEFORE your users log in - more information on how to do this is found at https://trailhead.salesforce.com/en/identity_login/identity_login_my_domain
2. If you are using Salesforce Classic - Set up a message on the Sidebar homepage to remind them to use Chrome.
3. If you are using Salesforce lightning - customize the homepage with a Lightning component.  The lightning component can be developed to perform the User-Agent testing and 'pop-up' a message accordingly. 
4. Really "out-there " - you can replace Salesforce's login with your own using Authentication Providers and completely control the entire login and browser verification process... But that requires a LOT of technical know-how as well as an 'Off Salesforce' piece to that solution.

Sorry there isn't an AppExchange package or simple configuration to get you exactly what you want, but I hope I've helped give you some ideas. Please don't forget to mark a comment (whether or not its mine) as 'Best Answer' to help the rest of the community.

Hope this helps!