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 {
|
2023-11-09 12:57:33 +00:00
|
|
|
abstract userAgent(): Promise<string>;
|
2022-07-05 13:41:43 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<string>
|