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

# Preload resources

> `Smile.preload(resources)`

This async method preloads and caches resources from the Smile API for instant access via their respective `preloaded()` methods. Refer to [preloading resources](https://dev.smile.io/js/concepts/preloading.md) to learn more about how preloading works and when to use it.

> [!TIP]
>
> To get the best performance, you should preload resources [during initialization](https://dev.smile.io/js/smile/initialize.md) or when [logging a customer in](https://dev.smile.io/js/resources/customer/login.md) . Doing so at either of these points will ensure fewer network calls as compared to using the `Smile.preload()` method later.

## Parameters

**resources** `array` *required*

An array with one or multiple [resource keys](https://dev.smile.io/js/concepts/preloading.md#resources-that-can-be-preloaded). Customer-specific resource keys can only be included when a customer is already logged-in.

## Returns

This method returns a `Promise` that:

* On success, resolves to void.
* On failure, rejects with an [error object](https://dev.smile.io/js/concepts/error-object.md).

If the method is improperly invoked (e.g. missing required parameters), the `Promise` will be rejected.

```javascript JavaScript lines theme={null}
await Smile.preload([
  'pointsSettings',
  'pointsProducts',
  'rewardFulfillments',
  'customerPointsProducts'
]);
```
