If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

The bottom bar IS refreshing (and being rebuilt by code on refresh) whenever the user goes to a new page.

For example, if I were to click on an app (like MobWars) from my main profile page, the page would refresh and the bottom toolbar would appear to remain the same, but in fact it also would be refreshed.

How about we contact a lead Facebook developer to take part in this conversation?

Or, alternatively, someone could easily disassemble the Facebook and have proof of what is really going on.

I would enter my opinion, but at this time I doubt it really matters.

The person who started the thread asked a question. I think the only suitable thing to respond with is a plausible answer. So animedude123, you have a few options to accomplish this; read the above posts for reference to these ideas, and try to ignore the silly fights that occurred intermittently.

Personally, I would like to think this is sufficient proof to backup hjb's theory:

function updateContent(url, html, id)
{
// get the content div
var content = document.getElementById('content');
// set innerHTML (update the page)
content.innerHTML = html;
// update the hash part of the url for browser history and possible bookmarking
window.location.hash = url;
// get reference to the iframe
var iframe = document.getElementById(id);
// set a timeout to then remove the iframe - we do this because IE has issues with iframes still loading after remove
setTimeout(function()
{
document.body.removeChild(iframe);
},200);
return false;
}

*NOTE* - I haven't tested any of the above code and I know there are issues:

* You need to write a php function to get the actual page html from database or file
* You need to write code to catch a user returning with a page address in the hash part of the url (ala Facebook) - true bookmarking with hash

I just want to confirm that the Facebook bar doesn't reload on page change.
If you want to test by yourself, install Firefox 3 and Firebug extension (www.getfirebug.com).

Once on a Facebook page, modify the HTML of an item of the bar* and change page ... the change is still there. This kind of change made by the user, change Facebook is not aware of, can't be transported on an new page.

* For example, in the console tab, type :
document.getElementById('presence_applications_tab').style.backgroundColor='red';
That line will change the bakcgound color of the "Application" button to red.

Also if you go to the HTML tab and unfold "body" and change page, you will see an iframe briefly appearing at the bottom of the tree.

Users who have thanked hjb for this post:

Definitely, the information you provided here has definitely been very useful. And correct, unlike a lot of other claims in this thread.

So does that mean Facebook NEVER uses AJAX? For the smaller functions as well, such as the "Like" buttons?
That's a surprise to me, I was convinced it was practically made up of AJAX - but I guess the end result is the same.

itsallkizza is correct. Ajax also includes iframe requests however, I know what you meant.

Facebook uses iframe and XMLHTTPRequests all over the place and all the time. If you install 'firebug' for firefox and click the console tab you can see all the requests flying.

I can only think they use XMLHTTPRequests for things that are 'nice have' items but not required for functionality, where they use iframes. For example, XMLHTTPRequests is used for chat, notifications and inbox updates, on page status updated.

That code is from IE6ify, a funny little joke for designers that if you put that code into a bookmark on your bookmark toolbar and keep clicking it, it randomly screws up your page.

Now why is this relevant?

I was on this thread a couple days ago, wondering exactly how Facebook DOES change its pages. And after sifting through the very caddy immature responses, and hallow threats to report to a MOD (for no reason) ... I discovered there was a misconception. On one end, people were claiming that it is impossible, that the bottom bar refreshes, as does the whole page. On the other end, (the right end), people were saying no it doesn't, it uses an iframe to bring in the content, etc, notice the hash in the address bar.

With the IE6ify script I included above, you can CLEARLY SEE it does NOT refresh the page. In fact, even in Safari it does not refresh it. YES, I know, it does in Chrome & IE, but those are irrelevant to this case because it does NOT in Firefox and Safari, making the question remain, how DO they do it? I think hjb provided a very good amount of information toward this, and want to comment quickly on that.

First let me preface what I'm about to say with IDGAF about my 'rep' or 'my post being removed' with this... but I think it's absolute BULL that there is SO MUCH immaturity on forums these days. We should all be here to help each other out. That's it. I absolutely HATE when people state "facts" and shut out any other suggestion from anyone else. Its absolutely ridiculous.