<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/database](./database.md) &gt; [goOnline](./database.goonline.md)

## goOnline() function

Reconnects to the server and synchronizes the offline Database state with the server state.

This method should be used after disabling the active connection with `goOffline()`<!-- -->. Once reconnected, the client will transmit the proper data and fire the appropriate events so that your client "catches up" automatically.

<b>Signature:</b>

```typescript
export declare function goOnline(db: FirebaseDatabase): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  db | [FirebaseDatabase](./database.firebasedatabase.md) | The instance to reconnect. |

<b>Returns:</b>

void

