2022-07-05 13:41:43 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Browser.userAgent
|
|
|
|
---
|
|
|
|
|
|
|
|
# Browser.userAgent() method
|
|
|
|
|
2023-09-18 09:05:23 +00:00
|
|
|
Gets this [browser's](./puppeteer.browser.md) original user agent.
|
|
|
|
|
|
|
|
[Pages](./puppeteer.page.md) can override the user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).
|
2022-07-05 13:41:43 +00:00
|
|
|
|
2022-10-24 07:07:05 +00:00
|
|
|
#### Signature:
|
2022-07-05 13:41:43 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Browser {
|
|
|
|
userAgent(): Promise<string>;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<string>
|