I am trying to assign a cookie in a GET request, in an order XMLHttpRequest
.
My code is as follows:
var pedido = new XMLHttpRequest()
pedido.open("GET","https://www.google.com/complete/search")
pedido.setRequestHeader("Cookie","SSID=AbhcxIM8JMu")
This throws me a warning in Firefox :
The request to establish a forbidden header was denied: Cookie
I suspect that the solution is to change something in the configuration of Firefox , but I do not know exactly how to do it.
Is it possible to do this in JavaScript ?