---
title: WorkerNavigator.connection
slug: Web/API/WorkerNavigator/connection
tags:
  - API
  - Connection
  - Experimental
  - Property
  - Reference
  - WorkerNavigator
browser-compat: api.WorkerNavigator.connection
---
{{APIRef("Network Information API")}}{{SeeCompatTable}}

The **`WorkerNavigator.connection`** read-only property returns
a {{domxref("NetworkInformation")}} object containing information about the system's
connection, such as the current bandwidth of the user's device or whether the connection
is metered. This could be used to select high definition content or low definition
content based on the user's connection.

## Syntax

```js
connectionInfo = navigator.connection
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [Online and offline events](/en-US/docs/Online_and_offline_events)
- [Network Information API](/en-US/docs/Web/API/Network_Information_API)
