title: Django ERR_CACHE_MISS on login page after clicking a link and back
body: <p>I have a login page with a form with username and password fields and a submit button. In the same page there are links to other pages on the site.</p>
  
  <p>I'm using the <a href="https://github.com/django/django/blob/master/django/contrib/auth/views.py#L40" rel="nofollow noreferrer">vanilla Django login view</a>. The user can login using the correct credentials, otherwise the login form shows authentication error as expected. Everything works fine so far. The issue I'm having is reproducible this way:</p>
  
  <ol>
  <li>go to login page and input wrong credentials, submit</li>
  <li>correctly validation errors appear on the form</li>
  <li>click some link on the page</li>
  <li>correctly the browser brings me on the other page following the <code>GET</code> request</li>
  <li>click on browser go back button</li>
  </ol>
  
  <p>Or, another way:</p>
  
  <ol>
  <li>go to login page and input wrong credentials, submit</li>
  <li>correctly validation errors appear on the form</li>
  <li>click on browser go back button</li>
  <li>click on browser go forward button</li>
  </ol>
  
  <p>At this point I get this message from the browser:</p>
  
  <blockquote>
    <p><strong>Confirm Form Resubmission</strong></p>
    
    <p>This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed.
    Press the reload button to resubmit the data needed to load the page.
    ERR_CACHE_MISS</p>
  </blockquote>
  
  <p>It's weird, but even more weird is that if I check on <em>Disable cache</em> in Chrome DevTools <em>Network</em> panel, the problem disappears (ie. when I click back, I see the form precompiled with previously inserted data). So I tried to add the <a href="https://docs.djangoproject.com/en/3.0/topics/http/decorators/#django.views.decorators.cache.never_cache" rel="nofollow noreferrer"><code>never_cache</code></a> decorator to <code>LoginView</code> just to see, but then realized this view (obviously) <a href="https://github.com/django/django/blob/master/django/contrib/auth/views.py#L53" rel="nofollow noreferrer">already has</a> the decorator applied.</p>
  
  <p>I wonder what the problem is and how to solve it.</p>