ajax - how does Google gmail, docs, etc. get its push-notification of changes? -
i assume there ajax request on client side polls updates, amazingly tight response. can provide more insight tricks may doing in protocol?
two methods used in case
polling: javascript code polls server every (for instance) 10 seconds see if there fresh news show
persistent connection: xmlhttprequest request performed client, , server keeps connection until there news (replies data client in case), or if given time-out reached - client tries again , on.
google uses 2nd option, replying , updating faster.
Comments
Post a Comment