views:

74

answers:

2

I've been trying to figure out how the "live search" function at http://www.codeandtheory.com/#/work/ works. I've looked at in firebug, and have looked at a bunch of AJAX search tutorials but codeandtehory's seems to work a lot "smoother". Any ideas?

+2  A: 

That page is not initiating any AJAX requests. All the data are already on the page, so the search simply shows or hides relevant results without needing to retrieve any new information from the server.

It's certainly smoother, since there's no lag for a network (AJAX) request, but it works only if it's feasible to put every possible search result on the page from the outset.

VoteyDisciple
A: 

I would not say the site is smooth, it makes 107 separate requests, a total of 2.17Mb for the initial load.

redsquare
Yeah, I noticed that ... Can you think of anyone who does it better?
stapler