> ## 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](/js/concepts/preloading) to learn more about how preloading works and when to use it.

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

## Parameters

<ParamField path="resources" type="array" required>
  An array with one or multiple [resource keys](/js/concepts/preloading#resources-that-can-be-preloaded). Customer-specific resource keys can only be included when a customer is already logged-in.
</ParamField>

## Returns

This method returns a `Promise` that:

* On success, resolves to void.
* On failure, rejects with an [error object](/js/concepts/error-object).

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

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