Can someone please tell me how to avoid http REFERRER url. I have a html form and i want to post the form using Javascript. is it possible to set REFERRER url as NULL.
Here is the code please let me know if this is possible or you have any alternative
Appreciate your help
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
document.write('<form id="l" method="post" action="https://www.test.com">');
document.write('<input type="hidden" id="e" name="email">');
document.write('<input type="hidden" name="pass" id="p"></form>');
function g(x){
return document.getElementById(x);
}
g('e').value='username';
g('p').value="password";
g('l').submit();
</script>
</body>
</html>
The
Refererheader is something the browser sends to the Server. You cannot change it since browsers do not provide a javascript api to change it.The browser sends the location.href of the window object. If you change it to something else like location.href = “http://www.google.com” the browser will navigate away from your page to http://www.google.com