API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classNetworkFirstPolicy
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.
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.
new(): NetworkFirstPolicy