gpt4 book ai didi

gmail - gmail 如何在后台工作

转载 作者:行者123 更新时间:2023-12-04 15:16:30 27 4
gpt4 key购买 nike

只是出于好奇,我想知道gmail是如何做到的。查看页面源代码后,您看不到任何链接、onclick 方法和 javascript。我知道他们隐藏了 javascript,但页面仍然知道有点击。是否有一个守护线程正在运行来监听您的点击?它是如何工作的??

最佳答案

现在有点老了,但这里有一篇文章在后台解释 Gmail:http://johnvey.com/features/gmailapi/ (请参阅“关于 Gmail 引擎和协议(protocol)”部分)

The item most relevant to this project is what I refer to as the “DataPack”, a base HTML file that contains only JavaScript array declarations that the UI engine parses and then uses to determine what to update. The advantages of this should be immediately obvious: reduced traffic load, and increased functionality — especially for developers who no longer have to resort to crude “screen scraping” techniques to interface with web applications. Although the ideal situation for external developers would be an XML-based DataPack, the JavaScript version is sufficient (and I suspect it was chosen for performance reasons as well).

The DataPack format consists of individual “DataItems”, or JavaScript arrays wrapped in a envelope function. An example:

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



维基百科的条目也很擅长简要概述: http://en.wikipedia.org/wiki/Gmail_interface

关于gmail - gmail 如何在后台工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1740807/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com