How gmail works under the hood

Just out of curiosity, I wonder how gmail does what it does. After searching the page source, you do not see the links, onclick and javascript methods. I understand that they hide javascript, but still the page knows that there was a click. Is there a daemon thread that listens for your clicks? How it works?

+6
gmail
source share
1 answer

A bit old, but here's an article explaining Gmail under the hood: http://johnvey.com/features/gmailapi/ (see the "About Gmail Device and Protocol" section)

The element most appropriate for this project is what I call "DataPack", a basic HTML file containing only JavaScript array declarations. The UI engine analyzes and then uses to determine what to update. the advantages of this should be immediately apparent: reduced traffic load and increased functionality - especially for developers who do not have longer will have to resort to rude "scrambling screens" to interact with web applications. Although an ideal situation for external developers would be based on XML DataPack, a JavaScript version is sufficient (and I suspect that it was selected for as well).

The DataPack format consists of separate "DataItems" or JavaScript arrays wrapped in an envelope function. Example:

D(["ts",0,50,106,0,"Inbox","fd36721220",154]);

Wikipedia is pretty good and in a quick overview: http://en.wikipedia.org/wiki/Gmail_interface

+5
source share

All Articles