Behind the scenes, if all you do is fetch the headers of a website, does the browser go ahead and downloaded the site's body content, even if you don't want it?
For example, in the code below I only want this website's headers, but I do not want the browser to download the page itself:
async function logHeaders()
{
let url = "https://randomuser.me/";
let res = await fetch(url);
res.headers.forEach((value,key)=>
{
console.log(key+':',value);
});
}
logHeaders();
I want to know if the browser preemptively downloads this page's content, despite the fact that I'm not requesting that. If it does, is there a way that I can explicitly cancel that preemptive download attempt before it happens?