Whether requests to another origin carry credentials: cookies,
authorization headers or TLS client certificates. It has no effect on
requests to the game's own origin, which always carry the browser's
credentials, as the page and its scripts do, so a game behind a login or a
session cookie loads its own assets without it.
since 20.4.0 as a setting: it is read-only, set it with
setOptions. It is a module binding, so assigning to it
(loader.withCredentials = true) throws a TypeError, and always did.
Example
// assets on a CDN behind a session cookie or a login loader.setOptions({ withCredentials:true }); awaitloader.preload(resources);
Whether requests to another origin carry credentials: cookies, authorization headers or TLS client certificates. It has no effect on requests to the game's own origin, which always carry the browser's credentials, as the page and its scripts do, so a game behind a login or a session cookie loads its own assets without it.