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

# load()

> Pre-loads the Daily JavaScript bundle to reduce join latency.

`load(properties?)`

✓ Prebuilt✓ Custom

Pre-loads the JavaScript bundle needed to join a call, giving you a head start before calling [`join()`](https://docs.daily.co/reference/daily-js/instance-methods/join). This is purely an optimization — if you skip it, the bundle loads automatically on the first call to `preAuth()`, `startCamera()`, or `join()` and is often already cached.

Calling `load()` will update the meeting state and trigger events as follows:

* On success: [`loading`](https://docs.daily.co/reference/daily-js/events/lifecycle-events#loading) → [`loaded`](https://docs.daily.co/reference/daily-js/events/lifecycle-events#loaded)
* On failure: [`loading`](https://docs.daily.co/reference/daily-js/events/lifecycle-events#loading) → one or more [`load-attempt-failed`](https://docs.daily.co/reference/daily-js/events/lifecycle-events#load-attempt-failed) → [`error`](https://docs.daily.co/reference/daily-js/events/error-events#error)

## Return value

Returns `Promise<void>`.

## Example

```javascript theme={null}
// Pre-load on page mount so join() is faster when the user clicks "Join"
call.on('loaded', () => console.log('Bundle ready'));
await call.load();
```

## See also

> [card] Methods
>
> * [join()](https://docs.daily.co/reference/daily-js/instance-methods/join.md)
> * [preAuth()](https://docs.daily.co/reference/daily-js/instance-methods/pre-auth.md)

> [card] Events
>
> * [loading](https://docs.daily.co/reference/daily-js/events/lifecycle-events.md#loading)
> * [loaded](https://docs.daily.co/reference/daily-js/events/lifecycle-events.md#loaded)
> * [load-attempt-failed](https://docs.daily.co/reference/daily-js/events/lifecycle-events.md#load-attempt-failed)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.