views:

94

answers:

1

Well, I was playing with Google query auto completion and noticed funny thing: if I for example type in "m" letter, it performs Ajax jsonp query. Then if I'll refresh my page and enter "m" letter again there would not be any query. The same thing happens with longer sequences of letters.

It's obvious that Google uses some client-side caching. And I'm quite positive that it doesn't store anything in cookies. I know some technologies that allow to cache large amounts of data on client side for JS use, but I'd like to know which one Google uses?

Their code is awfully obfuscated and it'll take me some time to find the answer by myself, so if someone will point me any descent up to date article about Google suggest that answers my question, I'd be very grateful.

+5  A: 

It's the browser that handles the caching. Google just implement all the relevant headers (eg Expires) to make sure the script is cached correctly, then the next time it's requested the browser fetches it from the cache. No fancy tricks or google magic going on :-)

EDIT: Best link I could find was http://code.google.com/speed/page-speed/docs/caching.html. Maybe someone else can point out some other links.

Andy E
Oh my. How could I've forgot about that :-( Thanks!
Dienow
@Dienow: We're all human, our brains cop out from time to time. You should have seen an answer I gave the other day ;-)
Andy E