pakopress.dev — SDK loading with onerror fallback

The SDK is loaded from a primary source; if the <script> fires onerror, the loader falls through to a second source — jsDelivr. No timeout: if the primary never resolves and never errors, the loader simply waits, so the log shows exactly what the browser does. Add ?break=1 to force the primary to a dead host as a sanity check.

Waiting for ID5…

Loader log

    What this tests

    A plain <script src> has no fallback list, so the loader relies on the onerror event: when the primary source fails, onerror should fire and the second source is appended. The open question this page answers on a given browser: does a failed/unavailable source actually fire onerror, or does it stay silent?

    <script
      src="https://cdn.id5-sync.com/api/1.0/id5-api.js"
      onerror="loadFallback()"></script>
    
    // loadFallback() appends the jsDelivr <script>; onerror is the only trigger.

    Requests made by this page

    amber = primary (cdn.id5-sync.com) · green = fallback (jsDelivr)

    typehostpath