man mod_browser () - Tries to recognize the browser and operating-system of the client.
NAME
mod_browser - 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 also 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|macosx|unknown
Name = opera|msie|netscape|lynx|mozilla| emacs|soffice|mosaic|safari
Version = float().
The function 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 can identify themselves as other browsers, read Opera.
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.
AUTHOR
Martin Gustafsson - support@erlang.ericsson.se