# mod_browser

### MODULE

mod_browser

### MODULE SUMMARY

Tries to recognize the browser and operating-system of the client.

### DESCRIPTION

When a client requests for an asset the request-header may contain a string that identifies the product. Many browsers even sends information about which operating-system the client use. This can be used in conjunction with mod_esi to tailor the response according to the users operating-system and browser.

This module can be used to recognize the browser and operating-system of the client in two ways either as a module in the EWSAPI response chain or by a separate call to the function `getBrowser/1`.

### EXPORTS

`getBrowser(AgentString)-> {Browser,OperatingSystem}`

Types:

`AgentString = string()`
`Browser = {Name,Version}|unknown`
`OperatingSystem = win3x|win95|win98|winnt|win2k|sunos4|sunos5| sun|aix|linux|sco|freebsd|bsd|unknown`
`Name = opera|msie|netscape|lynx|mozilla| emacs|soffice|mosaic`
`Version = float().`

`GetBrowser/1`, tries to detect which browser and operating- system the user has. Note that the answer is just a best guess since some browsers has the same

### EWSAPI MODULE INTERACTION

Exports the following EWSAPI interaction data, if possible:

`{'user-agent',AgentData}`
  Where `AgentData`is the same as the return value from `getBrowser/1`. Note that the answer is just a best guess, since some browsers can identify themselves as other browsers, read Opera.

### AUTHORS

Martin Gustafsson - support@erlang.ericsson.se

inets 2.6.5
Copyright © 1991-2002 Ericsson Utvecklings AB