I'm in firefox. Is there a way in javascript to make an http request with only custom headers? i.e. no cookie fields or user agent or anything, only what my js code specifies.
It should be base js not a library like jquery.
For example, trying to send Http GET without the 'Cookie' header, I tried already:
var myRequest = new XMLHttpRequest();
myRequest.open("GET", "http://asite.com");
myRequest.setRequestHeader("Cookie", '');
myRequest.send();
But I look in the developer console and the request was still sent with the session cookie. I also tried:
myRequest.setRequestHeader("Cookie", null);