> For the complete documentation index, see [llms.txt](https://attr.sygnal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://attr.sygnal.com/sa5-detect/user-agent-detection.md).

# User Agent Detection

## Goals

* Identify device type
* Identify browser type
* Identify browser language

## Use Cases

*

## Language

Check all&#x20;

```
// Some code
if (navigator.language.startsWith('fr')) {
    // Your script for French language users
    console.log("The script for French language users is running.");
    // Place your script here
}

```

## Notes

<https://www.tutorialspoint.com/detect-whether-a-device-is-ios-or-not-using-javascript>

<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent>

<https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent>
