2022-08-06 14:49:20 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Page.setOfflineMode
|
|
|
|
---
|
|
|
|
|
|
|
|
# Page.setOfflineMode() method
|
|
|
|
|
2022-10-14 12:54:46 +00:00
|
|
|
Sets the network connection to offline.
|
|
|
|
|
|
|
|
It does not change the parameters used in [Page.emulateNetworkConditions()](./puppeteer.page.emulatenetworkconditions.md)
|
|
|
|
|
2022-10-24 14:31:12 +00:00
|
|
|
#### Signature:
|
2022-08-06 14:49:20 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Page {
|
2023-11-15 10:48:54 +00:00
|
|
|
abstract setOfflineMode(enabled: boolean): Promise<void>;
|
2022-08-06 14:49:20 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | ------- | ---------------------------------------------------------- |
|
|
|
|
| enabled | boolean | When <code>true</code>, enables offline mode for the page. |
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
Promise<void>
|