AJAX Case Study of Gmail
Related Tags:
AJAX now filed, everyone would immediately think of Gmail, gogle map these classic AJAX applications. Gmail's excellent performance we have seen, then you realize it studied? How it in several different browsers can achieve consistent xml asynchronous call? Together at all times.
First, log gmail after we will enter this page:
<html>
<head>
<meta Content="text/html; charset=UTF-8" http-equiv="content-type">
<title> Gmail </ title>
<link Rel="alternate" type="application/atom xml" title="Gmail Atom Feed" href="feed/atom" />
<script Src="?view=page&name=browser&ver=c0d3d44c64799453"> </ script>
</ Head>
<noscript>
<font Face=arial>
Should enable JavaScript can be used in the standard view Gmail. However, it seems JavaScript has been disabled, or is your browser does not support JavaScript. To use the standard view, change your browser options to enable JavaScript, and then <a href = ""> retry </ a>. <p> Gmail to use the Basic html view (without JavaScript), <a href="?ui=html&zy=n"> please click here </ a>. </ P>
</ Font>
</ Noscript>
<script>
<! --
Var fs_time = (new Date ()). GetTime ();
Function wfs () (
Try (
If (parent! = Window & parent.wfs) (
Return false;
)
) Catch (e) (
)
If (top.location.href.indexOf ( 'nocheckbrowser')! = -1) (
Return true;
)
If (! Is_browser_supported) (
Top.location = '? Ui = j = html & zy';
Return false;
)
Var testcookie = '= jscookietest valid';
= Testcookie document.cookie;
If (document.cookie.indexOf (testcookie) == -1) (
Top.location = 'html / zh-CN / nocookies.html';
Return false;
)
Document.cookie = testcookie '; expires =' new Date (0). ToGMTString ();
Var agt = navigator.userAgent.toLowerCase ();
If (agt.indexOf ( 'msie')! = -1 & & & & Document.all agt.indexOf ( 'opera') == -1 & & agt.indexOf ( 'mac') == -1) (
Eval ( "var control = (agt.indexOf ( 'msie 5')! = -1)? 'Microsoft.XMLHTTP': 'Msxml2.XMLHTTP'; try (new ActiveXObject (control);) catch (e) (top. location = 'html / zh-CN / noactivex.html';}");
)
Return true;
)
Function lj () (
Js.location.replace ( '? View = page & name = & ver = d6079057e81abd3c js');
)
If (wfs ()) (
Document.write ( "<frameset onload=lj() rows=\"100%,*\" border=0> <frame name=main src=html/zh-CN/loading.html frameborder=0 noresize scrolling=no> <frame name=js src=html/zh-CN/loading.html frameborder=0 noresize> </ frameset >");}
//-->
</ Script>
</ Html>
This is the main framework of the web page of the browser. If your browser passed the test (javascript support, and cookie controls xml) in the framework of a section on the page to write code
To note here is the google played a small trick that the framework called main pages inside there seemed to be little things that are good NEE called js inside the framework of this.
We went on to pull out the framework of this js see:
Exactly over 1500 to the javascript code!
This page has more than 240 k, almost all of javascript code. Interested in the analysis of the brothers and sisters Click here to download.
In fact, most of them are platitudes of js code, but we can learn about the coding style google: compressed information, as far as possible, use a variable name never used the two letters, are all functions of the two letters, will function in the car is not, it is not the indent. Although the code does not specifically encryption, but a deal with the case after it a little readability. Fortunately keyword system is not diminished, the name of controls along the xml the horizon we can load up with AJAX asynchronous data related to several key function:
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Exactly over 1500 to the javascript code!
This page has more than 240 k, almost all of javascript code. Interested in the analysis of the brothers and sisters Click here to download.
In fact, most of them are platitudes of js code, but we can learn about the coding style google: compressed information, as far as possible, use a variable name never used the two letters, are all functions of the two letters, will function in the car is not, it is not the indent. Although the code does not specifically encryption, but a deal with the case after it a little readability. Fortunately keyword system is not diminished, the name of controls along the xml the horizon we can load up with AJAX asynchronous data related to several key function:
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
<html>
<head>
<meta Content="text/html; charset=UTF-8" http-equiv="content-type">
<title> Gmail </ title>
<link Rel="alternate" type="application/atom xml" title="Gmail Atom Feed" href="feed/atom" />
<script Src="?view=page&name=browser&ver=c0d3d44c64799453"> </ script>
</ Head>
<noscript>
<font Face=arial>
Should enable JavaScript can be used in the standard view Gmail. However, it seems JavaScript has been disabled, or is your browser does not support JavaScript. To use the standard view, change your browser options to enable JavaScript, and then <a href = ""> retry </ a>. <p> Gmail to use the basic HTML view (without JavaScript), <a href="?ui=html&zy=n"> please click here </ a>. </ P>
</ Font>
</ Noscript>
<script>
<! --
Var fs_time = (new Date ()). GetTime ();
Function wfs () (
Try (
If (parent! = Window & parent.wfs) (
Return false;
)
) Catch (e) (
)
If (top.location.href.indexOf ( 'nocheckbrowser')! = -1) (
Return true;
)
If (! Is_browser_supported) (
Top.location = '? Ui = j = html & zy';
Return false;
)
Var testcookie = '= jscookietest valid';
= Testcookie document.cookie;
If (document.cookie.indexOf (testcookie) == -1) (
Top.location = 'html / zh-CN / nocookies.html';
Return false;
)
Document.cookie = testcookie '; expires =' new Date (0). ToGMTString ();
Var agt = navigator.userAgent.toLowerCase ();
If (agt.indexOf ( 'msie')! = -1 & & & & Document.all agt.indexOf ( 'opera') == -1 & & agt.indexOf ( 'mac') == -1) (
Eval ( "var control = (agt.indexOf ( 'msie 5')! = -1)? 'Microsoft.XMLHTTP': 'Msxml2.XMLHTTP'; try (new ActiveXObject (control);) catch (e) (top. location = 'html / zh-CN / noactivex.html';}");
)
Return true;
)
Function lj () (
Js.location.replace ( '? View = page & name = & ver = d6079057e81abd3c js');
)
If (wfs ()) (
Document.write ( "<frameset onload=lj() rows=\"100%,*\" border=0> <frame name=main src=html/zh-CN/loading.html frameborder=0 noresize scrolling=no> <frame name=js src=html/zh-CN/loading.html frameborder=0 noresize> </ frameset >");}
//-->
</ Script>
</ Html>
This is the main framework of the web page of the browser. If your browser passed the test (javascript support, and cookie controls xml) in the framework of a section on the page to write code
To note here is the google played a small trick that the framework called main pages inside there seemed to be little things that are good NEE called js inside the framework of this.
We went on to pull out the framework of this js see:
Exactly over 1500 to the javascript code!
This page has more than 240 k, almost all of javascript code. Interested in the analysis of the brothers and sisters Click here to download.
In fact, most of them are platitudes of js code, but we can learn about the coding style google: compressed information, as far as possible, use a variable name never used the two letters, are all functions of the two letters, will function in the car is not, it is not the indent. Although the code does not specifically encryption, but a deal with the case after it a little readability. Fortunately keyword system is not diminished, the name of controls along the xml the horizon we can load up with AJAX asynchronous data related to several key function:
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Exactly over 1500 to the javascript code!
This page has more than 240 k, almost all of javascript code. Interested in the analysis of the brothers and sisters Click here to download.
In fact, most of them are platitudes of js code, but we can learn about the coding style google: compressed information, as far as possible, use a variable name never used the two letters, are all functions of the two letters, will function in the car is not, it is not the indent. Although the code does not specifically encryption, but a deal with the case after it a little readability. Fortunately keyword system is not diminished, the name of controls along the xml the horizon we can load up with AJAX asynchronous data related to several key function:
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
Function vb () (var a = null; if (r) (var b = fG? "Microsoft.XMLHTTP": "Msxml2.XMLHTTP" try (a = new ActiveXObject (b)) catch (c) (q (c ); alert ( "You need to function and commissioning activities script activeX control 。")}} else (a = new XMLHttpRequest (); if (! a) (; alert (" The browser does not support XMLHttpRequest 。")}} return a)
/ / Emu Notes XML structure and control back to the caller
Function ot (a, b) (; try (a.send (b)) catch (c) (q (c); if (c.number ==- 2146697208) (alert ( "Please ensure that Internet Explorer" language " is not set up some blank 。")}}}
/ / Emu Notes implementation of a data operation sent: XML control b: to send data
Function Wf (a, b, c) (Da (3), b = Ld (b); Hf (a, b, c))
/ / Emu a Notes: XML control b: visit the url c: Da callback function is a function of the length parameter validation
/ / Url Ld conversion processing is a function, which mainly deals with the url onboard CGI parameters and the number of pages, such as turning the pages
Function Hf (a, b, c) (Da (3); a.onreadystatechange = c; a.open ( "GET", b, true); ot (a, null))
/ / Emu Notes do not send data resources a direct request: XML control b: visit the url c: callback function
Function nt (a, b, c, d) (Da (4); a.onreadystatechange = d; a.open ( "POST", b, true); ot (a, c))
/ / Emu Notes data and send a request resources: XML control b: visit the url c: To send data d: callback function
Basically on so many, it is very disappointing, there is no fresh things. Http request sent how it handled the return of xml? In fact, he did not deal with. He dealt with only the most basic responseText and cgi generated js script directly to the client callback (using eval operation), or generate text messages. That is why gmail can easily cross-border several browser.
As one of the most respected AJAX applications, but little used xml. Xml like this used to send and receive text messages controls on the page after the show, AJAX Basically, it is now the most popular application, but that can be called AJAX? I would prefer to call it AJ, is the most AJAH.
Today, a first this, then next time analysis from another completely different AJAX applications bar. Everyone happy weekend!
- JavaScript in the prototype (prototype) attributes study
- Community study of the unique Sims blog
- CSS study notes 3
- Ajax study concluded [reproduced]
- Alexa World website ranking study
- AJAX Case Study of Gmail
- The study css
- Flex2 study notes ?ò
- Ajax study notes [zt]
- CSS notes a study
- CSS study (2)
- CSS study of the 10 reasons
- CSS study notes 2
- A study css
- CSS study notes 4
- CSS study (1)
- Alexa rankings updated study data
- Flex2 III study notes
- Study: Web traffic increased experience
- CSS study concluded




