Use the Perl variable $ENV{'HTTP_USER_AGENT'}and HTTP :: BrowserDetect .
Once you have determined which browser the client uses (for example, this is a mobile browser), you can decide what to send back to the client (mobile version or desktop version, etc.).
Bruce source
share