'Django Browser Cache Issues

My Django app has a forgot password functionality where I am sending emails containing a password reset link. However when this link is clicked, the browser automatically redirects it to the home page (I'm pretty sure this has to do with the caches stored by the browser rather than Django directly). This happens both on Firefox and Chrome.

Clearing cache or opening the link in incognito works but I can't tell users to do this every time and need a permanent solution.

The password reset urls are of the form: reset/<uidb64>/<token>. Any idea why this is happening and how to fix it?

The problem persists in the deployed app as well as while testing.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source