lookup(userAgent)

Provides the same functionality as parse(userAgent), but caches the results for the given user agent string in memory. This can provide faster lookups when repeatedly parsing identical user agent strings.

The last 5,000 user agent strings seen will be cached. Cached results will remain valid for up to 1 week.

Other User Agent Parsers

useragent: Derived from browserscope.org's user agent parser. An excellent user agent parser for web browsers, but I found user-agent-string.info's data better at categorizing and dealing with robots, software libraries, and other more esoteric user agents (at least for my use case).