Is it possible to spoof http request headers within javascript inside the client browser?

I was wondering whether it would be possible to modify the http request headers (such as HOSTS:) for sites that are using image pixel tracking.

marked as duplicate by Steffen Ullrich, ThoriumBR, tim, Matthew, crovers Dec 12 '16 at 15:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Unlikely as this would be a serious security issue. However, as @elsadek suggests, it might be possible from a browser addin which has more access. Certainly not possible from in-page JavaScript.

However, in terms of blocking tracking pixels. The issue is, how do you know whether an image will be a tracking pixel image BEFORE you access it? Once your browser has issued the request for it, the server already has your details.

Not the answer you're looking for? Browse other questions tagged or ask your own question.