mozilla

Compare Revisions

Ajax

Change Revisions

Revision 434425:

Revision 434425 by fusionchess on

Revision 434429:

Revision 434429 by fusionchess on

Title:
AJAX
AJAX
Slug:
AJAX
AJAX
Tags:
"XML", "XMLHttpRequest", "AJAX", "JXON", "References", "JSON", "JavaScript", "DOM"
"XML", "XMLHttpRequest", "AJAX", "JXON", "References", "JSON", "JavaScript", "DOM"
Content:

Revision 434425
Revision 434429
n8      <strong><a href="../en-US/docs/AJAX/Getting_Started" title=n8      <strong><a href="/en-US/docs/AJAX/Getting_Started" title="e
>"en-US/docs/AJAX/Getting_Started">Getting Started</a></strong><br>n-US/docs/AJAX/Getting_Started">Getting Started</a></strong><br>
>> 
n13        <strong>Asynchronous JavaScript + XML</strong>, while notn13        <strong>Asynchronous JavaScript + XML</strong>, while not
> a technology in itself, is a term coined in 2005 by Jesse James > a technology in itself, is a term coined in 2005 by Jesse James 
>Garrett, that describes a "new" approach to using a number of exi>Garrett, that describes a "new" approach to using a number of exi
>sting technologies together, including: <a href="../en-US/docs/HT>sting technologies together, including: <a href="/en-US/docs/HTML
>ML" title="en-US/docs/HTML">HTML</a> or <a href="../en-US/docs/XH>" title="en-US/docs/HTML">HTML</a> or <a href="/en-US/docs/XHTML"
>TML" title="en-US/docs/XHTML">XHTML</a>, <a href="../en-US/docs/C> title="en-US/docs/XHTML">XHTML</a>, <a href="/en-US/docs/CSS" ti
>SS" title="en-US/docs/CSS">Cascading Style Sheets</a>, <a href=".>tle="en-US/docs/CSS">Cascading Style Sheets</a>, <a href="/en-US/
>./en-US/docs/JavaScript" title="en-US/docs/JavaScript">JavaScript>docs/JavaScript" title="en-US/docs/JavaScript">JavaScript</a>, <a
></a>, <a href="../en-US/docs/DOM" title="en-US/docs/DOM">The Docu> href="/en-US/docs/DOM" title="en-US/docs/DOM">The Document Objec
>ment Object Model</a>, <a href="../en-US/docs/XML" title="en-US/d>t Model</a>, <a href="/en-US/docs/XML" title="en-US/docs/XML">XML
>ocs/XML">XML</a>, <a href="../en-US/docs/XSLT" title="en-US/docs/></a>, <a href="/en-US/docs/XSLT" title="en-US/docs/XSLT">XSLT</a>
>XSLT">XSLT</a>, and the most importantly <a href="../en-US/docs/D>, and the most importantly <a href="/en-US/docs/DOM/XMLHttpReques
>OM/XMLHttpRequest">XMLHttpRequest object</a>.<br>>t">XMLHttpRequest object</a>.<br>
n17        Although X in AJAX stands for XML, <a href="../en-US/docsn17        Although X in AJAX stands for XML, <a href="/en-US/docs/J
>/JSON" title="https://developer.mozilla.org/en-US/docs/JSON">JSON>SON" title="https://developer.mozilla.org/en-US/docs/JSON">JSON</
></a> is used more than XML nowadays because of its many advantage>a> is used more than XML nowadays because of its many advantages 
>s such as being lighter and a part of JavaScript. Both JSON and X>such as being lighter and a part of JavaScript. Both JSON and XML
>ML are used for packaging information in AJAX model.> are used for packaging information in AJAX model.
n29                <a href="../en-US/docs/AJAX/Getting_Started" titln29                <a href="/en-US/docs/AJAX/Getting_Started" title=
>e="en-US/docs/AJAX/Getting_Started">Getting Started</a>>"en-US/docs/AJAX/Getting_Started">Getting Started</a>
n35                <a href="../en-US/docs/DOM/XMLHttpRequest/Using_Xn35                <a href="/en-US/docs/DOM/XMLHttpRequest/Using_XML
>MLHttpRequest" title="/en-US/docs/DOM/XMLHttpRequest/Using_XMLHtt>HttpRequest" title="/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpR
>pRequest">Using the XMLHttpRequest API</a>>equest">Using the XMLHttpRequest API</a>
36              </dt>
37              <dd>36              </dt>
37              <dd>
38                The <a href="../en-US/docs/DOM/XMLHttpRequest" ti38                The <a href="/en-US/docs/DOM/XMLHttpRequest" titl
>tle="XMLHttpRequest"><code>XMLHttpRequest</code> API</a> is the c>e="XMLHttpRequest"><code>XMLHttpRequest</code> API</a> is the cor
>ore of AJAX. This article will explain you how to use some AJAX t>e of AJAX. This article will explain you how to use some AJAX tec
>echniques, like:>hniques, like:
n41                    <a href="../en-US/docs/DOM/XMLHttpRequest/Usin41                    <a href="/en-US/docs/DOM/XMLHttpRequest/Using
>ng_XMLHttpRequest#Handling_responses" title="/en-US/docs/DOM/XMLH>_XMLHttpRequest#Handling_responses" title="/en-US/docs/DOM/XMLHtt
>ttpRequest/Using_XMLHttpRequest#Handling_responses">analyzing and>pRequest/Using_XMLHttpRequest#Handling_responses">analyzing and m
> manipulating the response of the server</a>,>anipulating the response of the server</a>,
42                  </li>
43                  <li>42                  </li>
43                  <li>
44                    <a href="../en-US/docs/DOM/XMLHttpRequest/Usi44                    <a href="/en-US/docs/DOM/XMLHttpRequest/Using
>ng_XMLHttpRequest#Monitoring_progress" title="/en-US/docs/DOM/XML>_XMLHttpRequest#Monitoring_progress" title="/en-US/docs/DOM/XMLHt
>HttpRequest/Using_XMLHttpRequest#Monitoring_progress">monitoring >tpRequest/Using_XMLHttpRequest#Monitoring_progress">monitoring th
>the progress of a request</a>,>e progress of a request</a>,
45                  </li>
46                  <li>45                  </li>
46                  <li>
47                    <a href="../en-US/docs/DOM/XMLHttpRequest/Usi47                    <a href="/en-US/docs/DOM/XMLHttpRequest/Using
>ng_XMLHttpRequest#Submitting_forms_and_uploading_files" title="/e>_XMLHttpRequest#Submitting_forms_and_uploading_files" title="/en-
>n-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest#Submitting_form>US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest#Submitting_forms_
>s_and_uploading_files">submitting forms and upload binary files</>and_uploading_files">submitting forms and upload binary files</a>
>a> in <em>pure</em> AJAX or using <a href="../en-US/docs/DOM/XMLH> in <em>pure</em> AJAX or using <a href="/en-US/docs/DOM/XMLHttpR
>ttpRequest/FormData" title="DOM/XMLHttpRequest/FormData"><code>Fo>equest/FormData" title="DOM/XMLHttpRequest/FormData"><code>FormDa
>rmData</code></a> objects,>ta</code></a> objects,
48                  </li>
49                  <li>48                  </li>
49                  <li>
50                    <a href="../en-US/docs/DOM/XMLHttpRequest/Usi50                    <a href="/en-US/docs/DOM/XMLHttpRequest/Using
>ng_XMLHttpRequest#Types_of_requests" title="/en-US/docs/DOM/XMLHt>_XMLHttpRequest#Types_of_requests" title="/en-US/docs/DOM/XMLHttp
>tpRequest/Using_XMLHttpRequest#Types_of_requests">creating synchr>Request/Using_XMLHttpRequest#Types_of_requests">creating synchron
>onous or asynchronous requests</a>,>ous or asynchronous requests</a>,
n52                  <li>using AJAX within <a href="../en-US/docs/DOn52                  <li>using AJAX within <a href="/en-US/docs/DOM/
>M/Worker" title="/en-US/docs/DOM/Worker">Web workers</a>.>Worker" title="/en-US/docs/DOM/Worker">Web workers</a>.
n57                <a href="../en-US/docs/Server-sent_events" title=n57                <a href="/en-US/docs/Server-sent_events" title="/
>"/en-US/docs/Server-sent_events">Server-sent events</a>>en-US/docs/Server-sent_events">Server-sent events</a>
58              </dt>
59              <dd>58              </dt>
59              <dd>
60                Traditionally, a web page has to send a request t60                Traditionally, a web page has to send a request t
>o the server to receive new data; that is, the page requests data>o the server to receive new data; that is, the page requests data
> from the server. With server-sent events, it's possible for a se> from the server. With server-sent events, it's possible for a se
>rver to send new data to a web page at any time, by pushing messa>rver to send new data to a web page at any time, by pushing messa
>ges to the web page. These incoming messages can be treated as <e>ges to the web page. These incoming messages can be treated as <e
>m><a href="../en-US/docs/DOM/event" title="DOM/Event">Events</a> >m><a href="/en-US/docs/DOM/event" title="DOM/Event">Events</a> + 
>+ data</em> inside the web page. See also:&nbsp; <a href="../en-U>data</em> inside the web page. See also:&nbsp; <a href="/en-US/do
>S/docs/Server-sent_events/Using_server-sent_events" title="/en-US>cs/Server-sent_events/Using_server-sent_events" title="/en-US/doc
>/docs/Server-sent_events/Using_server-sent_events">Using server-s>s/Server-sent_events/Using_server-sent_events">Using server-sent 
>ent events</a>.>events</a>.
61              </dd>
62              <dt>61              </dd>
62              <dt>
63                <a href="../en-US/docs/Web/Guide/DOM/Manipulating63                <a href="/en-US/docs/Web/Guide/DOM/Manipulating_t
>_the_browser_history/Example" title="/en-US/docs/Web/Guide/DOM/Ma>he_browser_history/Example" title="/en-US/docs/Web/Guide/DOM/Mani
>nipulating_the_browser_history/Example"><em>Pure-AJAX</em> naviga>pulating_the_browser_history/Example"><em>Pure-AJAX</em> navigati
>tion example</a>>on example</a>
n69                <a href="../en-US/docs/DOM/XMLHttpRequest/Sendingn69                <a href="/en-US/docs/DOM/XMLHttpRequest/Sending_a
>_and_Receiving_Binary_Data" title="/en-US/docs/DOM/XMLHttpRequest>nd_Receiving_Binary_Data" title="/en-US/docs/DOM/XMLHttpRequest/S
>/Sending_and_Receiving_Binary_Data">Sending and Receiving Binary >ending_and_Receiving_Binary_Data">Sending and Receiving Binary Da
>Data</a>>ta</a>
70              </dt>
71              <dd>70              </dt>
71              <dd>
72                The <code>r</code><code>esponseType</code> proper72                The <code>responseType</code> property of the XML
>ty of the XMLHttpRequest object can be set to change the expected>HttpRequest object can be set to change the expected response typ
> response type from the server. Possible values are the empty str>e from the server. Possible values are the empty string (default)
>ing (default), <code>"arraybuffer"</code>, <code>"blob"</code>, <>, <code>"arraybuffer"</code>, <code>"blob"</code>, <code>"documen
>code>"document"</code>, <code>"json"</code>, and <code>"text"</co>t"</code>, <code>"json"</code>, and <code>"text"</code>. The <cod
>de>. The <code>response</code> property will contain the entity b>e>response</code> property will contain the entity body according
>ody according to <code>responseType</code>, as an <code>ArrayBuff> to <code>responseType</code>, as an <code>ArrayBuffer</code>, <c
>er</code>, <code>Blob</code>, <code>Document</code>, <code>JSON</>ode>Blob</code>, <code>Document</code>, <code>JSON</code>, or str
>code>, or string. This article will show some AJAX I/O techniques>ing. This article will show some AJAX I/O techniques.
>. 
73              </dd>
74              <dt>73              </dd>
74              <dt>
75                <a href="../en-US/docs/XML" title="XML">XML</a>75                <a href="/en-US/docs/XML" title="XML">XML</a>
n81                <a href="../en-US/docs/JXON" title="JXON">JXON</an81                <a href="/en-US/docs/JXON" title="JXON">JXON</a>
>> 
n87                <a href="../en-US/docs/Parsing_and_serializing_XMn87                <a href="/en-US/docs/Parsing_and_serializing_XML"
>L" title="Parsing_and_serializing_XML">Parsing and serializing XM> title="Parsing_and_serializing_XML">Parsing and serializing XML<
>L</a>>/a>
n93                <a href="../en-US/docs/XPath" title="XPath">XPathn93                <a href="/en-US/docs/XPath" title="XPath">XPath</
></a>>a>
94              </dt>
95              <dd>94              </dt>
95              <dd>
96                XPath stands for <strong>X</strong>ML <strong>Pat96                XPath stands for <strong>X</strong>ML <strong>Pat
>h</strong> Language, it uses a non-XML syntax that provides a fle>h</strong> Language, it uses a non-XML syntax that provides a fle
>xible way of addressing (pointing to) different parts of an <a hr>xible way of addressing (pointing to) different parts of an <a hr
>ef="../en-US/docs/XML" title="XML">XML</a> document. As well as t>ef="/en-US/docs/XML" title="XML">XML</a> document. As well as thi
>his, it can also be used to test addressed nodes within a documen>s, it can also be used to test addressed nodes within a document 
>t to determine whether they match a pattern or not.>to determine whether they match a pattern or not.
97              </dd>
98              <dt>97              </dd>
98              <dt>
99                <a href="../en-US/docs/DOM/FileReader" title="/en99                <a href="/en-US/docs/DOM/FileReader" title="/en-U
>-US/docs/DOM/FileReader">The <code>FileReader</code> API</a>>S/docs/DOM/FileReader">The <code>FileReader</code> API</a>
n111                <a href="../en-US/docs/AJAX/Other_Resources" titln111                <a href="/en-US/docs/AJAX/Other_Resources" title=
>e="en-US/docs/AJAX/Other_Resources">Other resources</a>>"en-US/docs/AJAX/Other_Resources">Other resources</a>
n118              <span class="alllinks"><a href="../en-US/docs/tag/An118              <span class="alllinks"><a href="/en-US/docs/tag/AJA
>JAX" title="en-US/docs/tag/AJAX">View All...</a></span>>X" title="en-US/docs/tag/AJAX">View All...</a></span>
n120            <h2 class="Other" id="Other">n120            <h2 class="Other" id="See_also">
n181                <a href="../en-US/docs/AJAX/Community" title="en-n181                <a href="/en-US/docs/AJAX/Community" title="en-US
>US/docs/AJAX/Community">AJAX community links</a>>/docs/AJAX/Community">AJAX community links</a>
n205              <span class="alllinks"><a href="../en-US/docs/AJAX:n205              <span class="alllinks"><a href="/en-US/docs/AJAX:To
>Tools" title="en-US/docs/AJAX:Tools">View All...</a></span>>ols" title="en-US/docs/AJAX:Tools">View All...</a></span>
t237              <a href="../en-US/docs/HTML" title="en-US/docs/HTMLt237              <a href="/en-US/docs/HTML" title="en-US/docs/HTML">
>">HTML</a>, <a href="../en-US/docs/XHTML" title="en-US/docs/XHTML>HTML</a>, <a href="/en-US/docs/XHTML" title="en-US/docs/XHTML">XH
>">XHTML</a>, <a href="../en-US/docs/CSS" title="en-US/docs/CSS">C>TML</a>, <a href="/en-US/docs/CSS" title="en-US/docs/CSS">CSS</a>
>SS</a>, <a href="../en-US/docs/DOM" title="en-US/docs/DOM">DOM</a>, <a href="/en-US/docs/DOM" title="en-US/docs/DOM">DOM</a>, <a hr
>>, <a href="../en-US/docs/JavaScript" title="en-US/docs/JavaScrip>ef="/en-US/docs/JavaScript" title="en-US/docs/JavaScript">JavaScr
>t">JavaScript</a>, <a href="../en-US/docs/XML" title="en-US/docs/>ipt</a>, <a href="/en-US/docs/XML" title="en-US/docs/XML">XML</a>
>XML">XML</a>, <a href="../en-US/docs/nsIXMLHttpRequest" title="en>, <a href="/en-US/docs/nsIXMLHttpRequest" title="en-US/docs/XMLHt
>-US/docs/XMLHttpRequest">XMLHttpRequest</a>, <a href="../en-US/do>tpRequest">XMLHttpRequest</a>, <a href="/en-US/docs/XSLT" title="
>cs/XSLT" title="en-US/docs/XSLT">XSLT</a>, <a href="../en-US/docs>en-US/docs/XSLT">XSLT</a>, <a href="/en-US/docs/DHTML" title="en-
>/DHTML" title="en-US/docs/DHTML">DHTML</a>, <a href="../en-US/doc>US/docs/DHTML">DHTML</a>, <a href="/en-US/docs/JavaScript/Same_or
>s/JavaScript/Same_origin_policy_for_JavaScript" title="en-US/docs>igin_policy_for_JavaScript" title="en-US/docs/JavaScript/Same_ori
>/JavaScript/Same_origin_policy_for_JavaScript">Same Origin Policy>gin_policy_for_JavaScript">Same Origin Policy</a>
></a> 

Back to History