I was just wondering as this code is in pure HTML with some JavaScript that gets me my current IP addresses (using jQuery AJAX call to a IPv4/v6 site) and also gets me my useragent.
However as it's all JS, I get the UA from the Navigator object rather than the headers, and using an agent switcher extension it changes the UA when I call a page that outputs the headers server side say with a google search of "what is my user-agent", but my page just gets the ua from the navigator object and it is always the true UserAgent never the switched one e.g
let ua= navigator.userAgent;
document.querySelect('#UA').innerHTML = "UserAgent: <b>" + ua + "</b>";
Is there a way to get the header / switched agent as well as or instead of the way I am getting at the moment?