简体   繁体   English

单击Django管理网站中的后退按钮

[英]clicking the back button in django admin site

I am new to Django . 我是Django的新手。 I am trying out the django admin/auth system. 我正在尝试django admin / auth系统。 I logged into the admin site first and then I logged out . 我先登录到管理站点,然后注销。 After logging out and clicking the back button on my browser(Chrome) I am still getting the old admin page . 注销并单击浏览器(Chrome)上的“后退”按钮后,我仍然得到旧的管理页面。 Should it not be redirected to login page instead? 不应将其重定向到登录页面吗? If so Is there some configuration issue on my setup? 如果是这样,我的设置是否存在一些配置问题?

What's happening 发生了什么

Chrome is not fetching the page again, just displaying what was there "before" and Chrome stored in its cache. Chrome不会再次获取该页面,只是显示“之前”的内容,然后Chrome存储在其缓存中。

Chrome is not even asking your webserver about the page, and as far as your app knows, you never went back to that page. Chrome甚至没有向您的Web服务器询问该页面,就您的应用程序而言,您从未回过该页面。

Don't worry about it 不用担心

However, if you: 但是,如果您:

  • Refresh the page 刷新页面
  • Try to POST some data, 尝试发布一些数据,

Chrome will have to hit your webserver, and Django will redirect to the login page. Chrome必须打您的网络服务器,而Django将重定向到登录页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM