# @aws-sdk/util-user-agent-browser

> [![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-user-agent-browser/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-user-agent-browser.svg)](https://www.n

Latest version **3.972.47** (published 2026-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @aws-sdk/util-user-agent-browser
pnpm add @aws-sdk/util-user-agent-browser
yarn add @aws-sdk/util-user-agent-browser
bun add @aws-sdk/util-user-agent-browser
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.972.47 |
| Published | 2026-09-22 |
| First published | 2019-01-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3670 |
| Author | AWS SDK for JavaScript Team |
| Maintainers | amzn-oss, aws-sdk-bot |

## Links

- npm: https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser
- Repository: https://github.com/aws/aws-sdk-js-v3
- Homepage: https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/util-user-agent-browser
- Issues: https://github.com/aws/aws-sdk-js-v3/issues
- npm.io page: https://npm.io/package/@aws-sdk/util-user-agent-browser

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [@aws-sdk/core](https://npm.io/package/@aws-sdk/core.md) ^3.978.1

## Recent versions

- 3.972.47 (latest) — 2026-09-22
- 1.0.0-rc.10 (rc) — 2020-12-15
- 1.0.0-gamma.8 (gamma) — 2020-10-07
- 1.0.0-beta.4 (beta) — 2020-04-27
- 1.0.0-alpha.9 (alpha) — 2020-03-20
- 0.1.0-preview.9 (preview) — 2019-11-19
- 3.972.46 — 2026-09-09
- 3.972.45 — 2026-08-21
- 3.972.44 — 2026-08-14
- 3.972.43 — 2026-08-11
- 3.972.42 — 2026-08-04
- 3.972.41 — 2026-08-03
- 3.972.40 — 2026-07-31
- 3.972.39 — 2026-07-29
- 3.972.38 — 2026-07-28
- … 234 more at https://npm.io/package/@aws-sdk/util-user-agent-browser/versions

## README

# @aws-sdk/util-user-agent-browser

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-user-agent-browser/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-user-agent-browser.svg)](https://www.npmjs.com/package/@aws-sdk/util-user-agent-browser)

## Usage

In previous versions of the AWS SDK for JavaScript v3, the AWS SDK user agent header was provided by parsing the navigator user agent string with the `bowser` library.

This was later changed to browser feature detection using the native Navigator APIs, but if you would like to have the previous functionality, use the following code:

```js
import { createUserAgentStringParsingProvider } from "@aws-sdk/util-user-agent-browser";

import { S3Client } from "@aws-sdk/client-s3";
import pkgInfo from "@aws-sdk/client-s3/package.json";
// or any other client.

const client = new S3Client({
  defaultUserAgentProvider: createUserAgentStringParsingProvider({
    // For a client's serviceId, check the corresponding shared runtimeConfig file
    // https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-s3/src/runtimeConfig.shared.ts
    serviceId: "S3",
    clientVersion: pkgInfo.version,
  }),
});
```

This usage is not recommended, due to the size of the additional parsing library.

---
_Source: https://npm.io/package/@aws-sdk/util-user-agent-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
