# Browser Detection with `UA`

This example demonstrates how to access YUI's built-in user-agent information to learn things about the environment in which your code is running. This includes information like what browser, version, and operating system are being used; it also includes context information like whether you're code is running on a mobile browser, running in a secure page, or running under Adobe Air or Google Caja.

Note: We strongly recommend using feature detection rather than user-agent sniffing to fork code. Fork on the user-agent information only when absolutely necessary to do so (for example, in cases where browsers do not report their own capabilities accurately).

    UA properties set for your browser: