Jump to content

clear memory cache in php


sueirnaa

Recommended Posts

i got problem with my page. How do i clear memory browser in php script?...when i login to my page..then press button back in browser...it will back to login page..and when i press button forward..it will proceed next page without login..it seems not secure.

Link to comment
Share on other sites

I don't think that's a problem, per se. A login form is usually viewable by navigating to it through the history or by direct address input, but just because you're seeing it doesn't mean that you're signed out. I assume you are storing login data in the session and/or through cookies? As long as the session or other cookies are set, you can skip over the login form without filling it in because you are not destroying the session/cookies on the form page. The script that handles the form submission to login should destroy the session and clear any login cookies before setting new ones, though.

Link to comment
Share on other sites

Really, unless you use headers (although I'm still not sure if it's possible), or javascript to modify the back/forward buttons, you can't do it. If you haven't noticed, when you press back and forward the page doesn't reload since it's coming from the memory, so a server side script won't be able to affect this. But also as said above, it's not really a security issue, since going back isn't actually logging you out. It's just taking you to the cached page you were at before you logged in. For example, if you go to a website and log in from the home page, then press back, it may look like you are once again logged out, but if you refresh the page, you will see that you're still actually logged in.Another example, would be these forums. Press back after you have posted a response. The response won't be shown because you just went back to when it didn't exist, but it's still there.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...