People can view the products catalog, view the cart etc., either log in as a registerd user or not log in, view as guest.
On these pages, I would like to show the button "log out" to the people who already log in. show the button "log in" to the people who not log in yet.
I will use the login checking code and if statements to decide show button "log in" or show button "log out".
So far, no problem.
The problem is if the user visiting 30 pages and then log in, and then he backward to the previous pages. These pages will still show the button "log in" to him even he has just logged in and he should see the button "log out".
And expire all these pages immediately will also bring other issues such as form submit dialog boxes etc.
Any suggestions?