如何在注销时禁用浏览器缓存。我用过:
<meta http-equiv="cache-control" content="no-cache"> <!-- tells browser not to cache -->
<meta http-equiv="expires" content="0"> <!-- says that the cache expires 'now' -->
<meta http-equiv="pragma" content="no-cache"> <!-- says not to use cached stuff, if there is any -->
但是当我点击退出时,我仍然会收到上一页。
答案 0 :(得分:0)
这适用于大多数浏览器,但为了防止Firefox缓存,您需要额外的两个标头Cache-Control=no-store
和Cache-Control=must-revalidate
。因此,试试:
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="cache-control" content="no-store">
<meta http-equiv="cache-control" content="must-revalidate">