I am submitting a ajax form in django and using
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
to get csrf_token. The form is working well in chrome. But in firefox the value of csrf_token is null and its giving 403 forbidden error. I am not receiving csrf_token in console when I checked cookies in console. Why django is not giving csrf_token to firefox browser ?