I Agree, I was looking at this after helping to improve browser detection for a template framework. There is a lot that is not detected (edge for example), and somethings are attributed to the wrong rendering engine (chrome) because at some version the rendering engine in the browser changed. I had a hard time wrapping my head around the logic for how the WebClient browser detection worked or why it's setting the browser as a numeric constant. (basically I'm not sure how the consuming packages are using this library)
I think there is definitely interest in the WebClient browser detection being a separate package.
There are also additional options for detection, currently we are using the $_SERVER['HTTP_USER_AGENT']
constant, and then using custom parsing of the user_agent string. We could possibly pull in the browscap.ini
and use get_browser()
to have a better object to work with. Although I'm not sure if pointing to a "custom" browscap.ini during runtime with ini_set('
browscap', '[thebrowscap.ini file location]'); will give us the necessary ability to use get_browser()