遇到一個問題,User登入後按瀏覽器的回上頁,右上角的登入區塊
不會更新,觀察log發現,瀏覽器回上面時沒有向server發出request
解決方法:
停用頁面快取
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"