You can read browser information based on the HTTP_USER_AGENT line, but, as mentioned above, and in many other places, it is also very easy to trick this information. On the server side, we only cared because it gave us a general idea that client browsers are used to access our sites.
An attempt to respond to the browser on the backend and present other content for several days has been tested by sites, but it fails because browsers trick other browsers but do not have the same errors.
As @Stephen Orr said, CSS is the best way to handle this. Sure, damn it, it's still error prone, but better than sniffing a browser signature. We used to criticize every release of IE because it violated previous fixes. Fortunately, it seems that things get better when manufacturers creep to standards.
source share