开发者

How google suggest caches queries on client side?

开发者 https://www.devze.com 2022-12-19 18:45 出处:网络
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 ent

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消