I want to prefetch (or maybe preload) a JSON file from an URL and use it later on my JS file. How can I send the prefetched JSON to the JS file?
Something like on the HTML head:
<link rel="prefetch" href="https://json.file" as="fetch">
or on the JS file:
fetch("the prefetch file above")
.then((res) => res.json())
.then((data) => {
});