API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classNetworkFirstPolicy

@codexo/exojs / assets / stable

Fetches first and only falls back to the cache when the network failed. For content that changes behind a stable URL and should be as fresh as the connection allows, while still working offline. The fallback is deliberately narrow. Only a transport or HTTP failure (`AssetNetworkError`) permits it: a cancelled load must stay cancelled, and a response the codec could not read is a broken source rather than an absent network - serving a stale representation for either would turn a visible failure into a silently wrong asset. When the network failed and the cache has nothing, the network failure is what surfaces, because it is the one that explains the load.

0
props
1
methods
0
events
Import
import { NetworkFirstPolicy } from '@codexo/exojs'

Fetches first and only falls back to the cache when the network failed.

For content that changes behind a stable URL and should be as fresh as the connection allows, while still working offline.

The fallback is deliberately narrow. Only a transport or HTTP failure (`AssetNetworkError`) permits it: a cancelled load must stay cancelled, and a response the codec could not read is a broken source rather than an absent network - serving a stale representation for either would turn a visible failure into a silently wrong asset. When the network failed and the cache has nothing, the network failure is what surfaces, because it is the one that explains the load.

Constructors1
new(): NetworkFirstPolicy
Methods1
Source