Warptweet Posted June 8, 2008 Share Posted June 8, 2008 Hi there, When a user logs into my website http://www.uploadpoints.com, the navigation is set to show a different list of urls. However, when they log in, (at least for me), they need to press the refresh button in order to see the changes. I tried deleting the Cache using some snippets from other places, but it didn't work. Header("Cache-control: private, no-cache"); Header("Expires: Mon, 26 Jun 1997 05:00:00 GMT"); Header("Pragma: no-cache"); How can I delete the cache or use some other method to make the navigation change on-time? Link to comment https://forums.phpfreaks.com/topic/109287-changes-not-appearing/ Share on other sites More sharing options...
Nexy Posted June 8, 2008 Share Posted June 8, 2008 You could put header("location: #"); This will make a "#" at the end of your url and basically a very quick refresh of the page. Might be a better way to do it, but this usually works. Link to comment https://forums.phpfreaks.com/topic/109287-changes-not-appearing/#findComment-560583 Share on other sites More sharing options...
Warptweet Posted June 8, 2008 Author Share Posted June 8, 2008 It made the page refresh infinitely, before it even loaded. Link to comment https://forums.phpfreaks.com/topic/109287-changes-not-appearing/#findComment-560599 Share on other sites More sharing options...
webent Posted June 8, 2008 Share Posted June 8, 2008 The way I've always done that is just using an if statement on the level of the user... i.e. if($_SESSION['level'] == 1) {echo '<a href="theprivatelinks">';} or if($_SESSION['level'] == 2) {echo '<a href="thepubliclinks">';} ... don't know if this helps or not, but dynamic pages shouldn't suffer from caching problems, at least I've never had that problem... Unless that is of course unless the sessions are not being destroyed prior to changes being made... Link to comment https://forums.phpfreaks.com/topic/109287-changes-not-appearing/#findComment-560614 Share on other sites More sharing options...
Nexy Posted June 8, 2008 Share Posted June 8, 2008 Like webnet said, you should check if they are logged in then use either his/her way or the way I mentioned: if(logged_in) { header("location: #"); } Link to comment https://forums.phpfreaks.com/topic/109287-changes-not-appearing/#findComment-560703 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.