views:

10

answers:

0

I've got a site with a basic login/logout system.

When I display pages I do a check to see when the page was last modified and if the browser has sent an if modified since header. If it hasn't been modified I send a 304 header and exit.

This obviously loads the page alot quicker and means less memory and processing power for me as I don't have to build the pages content.

However, I find that if a user logs in and then views an un-modified page he still sees the "sign in" button, the same is true if he logs out and views an un-modified page, he'll see the option to "logout".

This seems like it would be a common occurence for anybody wishing to use 304 not modified headers, yet i'm struggling to find any discussion on how to solve it.

Any help would be much appreciated (I realise I haven't given much info but i'm not sure what else to say it's quite self explanatory)