dadamssg Posted June 5, 2009 Share Posted June 5, 2009 how does facebook achieve their 'real time' effect? For instance...it shows 4 New Posts or your notifications as soon as they happen without having to refresh the page. I want to implement this on my website for personal messages and other things. I just have NO idea where to even start Quote Link to comment https://forums.phpfreaks.com/topic/161016-display-in-real-time/ Share on other sites More sharing options...
roopurt18 Posted June 5, 2009 Share Posted June 5, 2009 I'm not sure what they're using, but you can achieve the same thing with XHR (also called AJAX (which is a stupid term that should go away)). The simple idea is to use JavaScript to have the user's browser poll the site asking if there are any updates. If there are, you bring them in and update the HTML with DOM API. The fancier version is to install an ActiveX or Java applet on the user's machine and the server pushes the updates to the clients; this way you don't have to have clients constantly polling the crap out of your site. Quote Link to comment https://forums.phpfreaks.com/topic/161016-display-in-real-time/#findComment-849744 Share on other sites More sharing options...
dadamssg Posted June 5, 2009 Author Share Posted June 5, 2009 does this sort of thing have a distinct term i can google to find out how to impliment it? Quote Link to comment https://forums.phpfreaks.com/topic/161016-display-in-real-time/#findComment-849749 Share on other sites More sharing options...
roopurt18 Posted June 5, 2009 Share Posted June 5, 2009 Learning how to pick keywords out of text will serve you well in the future. But I'll help you! "I'm not sure what they're using, but you can achieve the same thing with XHR (also called AJAX (which is a stupid term that should go away)). The simple idea is to use JavaScript to have the user's browser poll the site asking if there are any updates. If there are, you bring them in and update the HTML with DOM API. The fancier version is to install an ActiveX or Java applet on the user's machine and the server pushes the updates to the clients; this way you don't have to have clients constantly polling the crap out of your site." Quote Link to comment https://forums.phpfreaks.com/topic/161016-display-in-real-time/#findComment-849756 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.