Jump to content

Auto Refreshing page problems


LOUDMOUTH

Recommended Posts

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

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.