> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapengine.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reload

> Reload the active tab, optionally bypassing the HTTP cache.

## Overview

The `/browser/sessions/{id}/reload` endpoint reloads the currently active tab. By default the reload reuses the HTTP cache; pass `ignoreCache: true` to force a full re-fetch of all resources.

The call blocks until the configured wait condition is met or the timeout elapses.

## Path Parameters

<ParamField path="id" type="string" required={true}>
  Browser session ID (UUID). Create via `POST /browser/sessions`.
</ParamField>

## Body

All body fields are optional — the request body may be omitted entirely.

<ParamField body="ignoreCache" type="boolean" default="false">
  When `true`, bypasses the HTTP cache (equivalent to `Ctrl+Shift+R`). Re-fetches all resources from origin.
</ParamField>

<ParamField body="waitUntil" type="string" default="load">
  When to consider the reload finished. One of `load`, `domcontentloaded`, `networkidle`.
</ParamField>

<ParamField body="timeout" type="integer" default="30000">
  Maximum time (ms) to wait for the reload to complete. Range `0`–`120000`.
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL (default) theme={null}
  curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/0f2b1f6a-88ac-4d25-bc58-67a6f4b4a001/reload" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```

  ```bash cURL (hard reload) theme={null}
  curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/0f2b1f6a-88ac-4d25-bc58-67a6f4b4a001/reload" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "ignoreCache": true,
      "waitUntil": "networkidle"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.scrapengine.io/api/v1/browser/sessions/0f2b1f6a-88ac-4d25-bc58-67a6f4b4a001/reload",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        ignoreCache: true,
        waitUntil: "networkidle",
      }),
    },
  );
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.scrapengine.io/api/v1/browser/sessions/0f2b1f6a-88ac-4d25-bc58-67a6f4b4a001/reload"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
  }
  payload = {
      "ignoreCache": True,
      "waitUntil": "networkidle",
  }

  response = requests.post(url, headers=headers, json=payload)
  data = response.json()
  ```
</CodeGroup>

## Response

### Success Response (200)

<ResponseField name="url" type="string">
  Effective URL of the active tab after reload.
</ResponseField>

<ResponseField name="pageId" type="string">
  CDP target identifier of the tab the reload applied to.
</ResponseField>

**Example Response:**

```json theme={null}
{
  "url": "https://example.com/",
  "pageId": "EA5E9AA71C7A91C467F8CDBB266EE5E0"
}
```

### Error Responses

| Status | Description                                       |
| ------ | ------------------------------------------------- |
| `401`  | Unauthorized — invalid or missing API key.        |
| `404`  | Session not found or not owned by the caller.     |
| `408`  | Reload did not complete before `timeout` elapsed. |
| `503`  | The browser session is temporarily unreachable.   |

## Notes

* `ignoreCache: true` is equivalent to `Ctrl+Shift+R` — re-fetches all resources bypassing the HTTP cache.
* The URL of the active tab is preserved across reloads; only the document and its subresources are refetched.
