MrJames 4 Posted January 26, 2012 Report Share Posted January 26, 2012 Hi. I was just wondering how facebook does it's continious updates on the wall if you know what I mean, I take it after a certain amount of time it calls a scripts which then gets the latest round of updates. So what technologies would be used here ? and also how would you stop it from repeating it's-self(i.e. calling the same data from before) ? Also does anyone know of any examples of this ? Regards Quote Link to post Share on other sites
Jonathon 255 Posted January 26, 2012 Report Share Posted January 26, 2012 I think it uses AJAX to call the new feeds on the onmouseover() event. I suspect it also has some kind of timer on inactivity otherwise it would be being called all the time. 1 Quote Link to post Share on other sites
HartleySan 826 Posted January 27, 2012 Report Share Posted January 27, 2012 Most likely, FB is using the setInterval function in JS. The function can be used to perform a call to a function every so many milliseconds. From there, you just update the info as necessary using Ajax. I imagine that whenever data is updated/displayed, they place a timestamp in a variable, and when the setInterval function is called, it only grabs data with a more recent timestamp than the timestamp stored in the local JS variable. There are any number of approaches to this, and it really depends on how much you need to update your page, etc. 1 Quote Link to post Share on other sites
jabsalud 0 Posted December 28, 2012 Report Share Posted December 28, 2012 hey folks im wondering if jquery is the same as ajax? any answer to that? Quote Link to post Share on other sites
HartleySan 826 Posted December 28, 2012 Report Share Posted December 28, 2012 jQuery is a Javascript library written entirely in Javascript, and Ajax is a technology (if you will) that involves using a specific object in Javascript to make asynchronous calls to server-side scripts. You can use both Javascript and jQuery to make Ajax calls. I prefer the JS way, but many people claim that the jQuery way of implementing Ajax is easier. If you wanna know more, I recommend picking up Larry's Ajax book. Quote Link to post Share on other sites
jabsalud 0 Posted December 28, 2012 Report Share Posted December 28, 2012 ooh my friend tells me about the compatibility of jquery in ie browser and i dont know that you can do that using javascript. i should probably consider larry's modern javascript book. thanks hartleysan Quote Link to post Share on other sites
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.
Note: Your post will require moderator approval before it will be visible.