I have a simple form in which I am using a csrfmiddlewaretoken in django as:
<form>
{% csrf_token %}
</form>
On page load both the csrfmiddlewaretoken in form and csrftoken in cookie are same but when I refresh the page using ctrl + F5, the csrftoken in cookie changes but the csrfmiddlewaretoken in the form remains same, which leads to the future POST AJAX request fail.
What can be the reason of this ?