Invalidate cache of a “login protected” area upon logout

萝らか妹 提交于 2021-02-11 13:47:48

问题


Say you're HTTP caching a login protected page (not critical banking info).

Now because you're using HTTP caching, logging out (destroying the session) will not have an effect on that cached page.

Currently, the only way I can think of is to explicitly set a sensible max-age cache value so it at least expires at some point.

E.g., members_area.php

\header('Cache-Control: max-age=60');

Other than this, are there better ways to invalidate memebrs_area.php in the user's browser when they click the logout button?

来源:https://stackoverflow.com/questions/61717739/invalidate-cache-of-a-login-protected-area-upon-logout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!