php - Website doesn't display pages as requested until Control+F5 -
i have strange situation here.
i had coded webpage in php. works fine throughout day if close down , try access again following day doesn't quite work needed.
for example: have main login page. when user logs in url changes following page still shows login input.
if manually enter url again , press ctrl+f5 original page. if press on logout page calls logout.php url change still shows me index page until manually entere url , press ctrl+f5 force refresh.
once pages have been accessed way website starts working fine again.
i have put headers not cache webpages not helping here.
it happens browsers.
any advice or sounding bit stupid here?
header("cache-control: no-cache, must-revalidate"); header("expires: mon, 26 jul 1997 05:00:00 gmt"); session_start(); if(isset ($_session['user'])) { echo "logged in as:".$_session['user']; echo "<a href=\"index.php\">home</a>"; echo "<a href=\"logout.php\">logout</a>"; exit; } else { echo "<form name=\"login\" action=\"index.php\" method=\"post\" onsubmit=\"return validatelogin(this);\">"; echo "<input type=\"text\" placeholder=\"username\" name=\"username\">"; echo "<input type=\"password\" placeholder=\"password\" name=\"password\"> "; echo "<a href=\"forgot.php\">forgot password</a>"; echo "<input type=\"submit\" name=\"submit\" value=\"submit\"> "; echo "</form>";
Comments
Post a Comment