3 ms·
Note that if you send any non standard request headers, for the CORS response to be cached and reused, you need to make an initial request with exactly same set
by jakub_g 5y ago
Note that if you send any non standard request headers, for the CORS response to be cached and reused, you need to make an initial request with exactly same set of headers, which means it is only possible via JS (preload request can't have extra headers). Hence inlined JS to send the "warmup" request. You can wrap it in a promise which resolves on response, and only then do the actual app request.