Jump to content

Search


The Little Guy

Recommended Posts

I'M not sure how I should go about this...

 

I would like to have a search box, where a user can search his/her friends list.

 

Would you:

 

a. Use AJAX to search for the users friends that start with what ever the user types into the text box.

 

b. Preload all of the users friends at page load into an array, and search the array.

 

c. Something different

Link to comment
Share on other sites

Depends what they are searching their Flist for..

 

Just to view their friends web pages?  Bring up contact information about a friend (not all friends post the same type of info).  Live chat?

 

Still, thinking about it, Ajax would probably be best for displaying results that lead to page navigation. (something for the user to click on to go somewhere else)

Link to comment
Share on other sites

Yea, I have a FB.

 

I'm fairly certain it's ajax, can't look at the code atm, at work, but I'm sure you could look.  I wouldn't say it's too fast at all, if anything it probably does cache things locally though.  You have a set amount of friends, groups, etc... I wouldn't be surprised if it caches the predictable searches..  But then again, they do have 1000s of servers, so it could just be really fast Ajax.

 

Test it?  Start a search so that you get a result.. then unplug/disable your inet,  keep typing and see if it works or errors.

Link to comment
Share on other sites

Hrmm wonder what search_friend_source is.  Don't feel like finding it in the 123819203890 JS files on Facebook's site.

 

 

It has to be preloading it somehow....  Cause I don't see any requests (besides images) when the friends pop down.

 

 

I would guess that they're loaded the first time the search is used....  Dunno.

 

 

 

Hrmm looked more deeply into it, and it turns out when you first click on the search box, it loads all of your friends.

 

 

Firebug owns.

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.