LOUDMOUTH Posted March 17, 2009 Share Posted March 17, 2009 I have a page that is auto refreshing. and it is making my members show up as Active every second, even when they are not browsing the site. How do i stop this? Quote Link to comment https://forums.phpfreaks.com/topic/149777-auto-refreshing-page-problems/ Share on other sites More sharing options...
Festy Posted March 17, 2009 Share Posted March 17, 2009 You haven't explained your problem clearly, hence no reply. Can you please post your code/url or some more details ? Quote Link to comment https://forums.phpfreaks.com/topic/149777-auto-refreshing-page-problems/#findComment-786522 Share on other sites More sharing options...
LOUDMOUTH Posted March 17, 2009 Author Share Posted March 17, 2009 Sorry about that I have a homepage that uses meta refresh, to refresh a chatbox on the page. But when people stay on the page with the Chatbox it shows them as active every second in my online now sections of the page. Is there a way to stop this refreshing from happening? Or a way to stop the homepage from refreshing at all? this is the only refresh code I can find in my site. function mrefresh($url, $time="1"){ echo '<meta http-equiv="refresh" content="'.$time.';url='.$url.'">'; } If there isnt a way to stop the refresh, is there a code I can use in my site to make it so people cannot refresh with out a prompt? Thank you for taking the time to help me out Quote Link to comment https://forums.phpfreaks.com/topic/149777-auto-refreshing-page-problems/#findComment-786532 Share on other sites More sharing options...
Festy Posted March 17, 2009 Share Posted March 17, 2009 Yes there are 2 ways to stop refreshing: 1. Use Ajax to only refresh part of the page. In your case the part is 'Chat box'. It's very easy. Enclose your Chat Box code in a <div id='chatbox'></div> tag and refresh this div automatically using Ajax. 2. If you don't want to use Ajax, then you can use IFrames and meta refresh you chat box page. Quote Link to comment https://forums.phpfreaks.com/topic/149777-auto-refreshing-page-problems/#findComment-786582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.