AJAX
Asynchronous JavaScript and XML (commonly abbreviated AJAX) is emerging as one of the most effective methods of creating interactive Web Applications. It is a method which combines client-side script (typically JavaScript, JScript or VBscript) and server-side data or computation, along with some RIA techniques (such as DHTML, Drag & Drop and Animation) for improving the usability and interactivity of Web Applications. [1]
Contents
Specifications
- XMLHttpRequest Level 2: http://http://www.w3.org/TR/XMLHttpRequest/
- XMLHttpRequest: http://www.w3.org/TR/2007/WD-XMLHttpRequest-20071026/
- Making AJAX Applications Crawlable: http://code.google.com/web/ajaxcrawling/
Standards
AJAX is based on 4 existing web standards which are well defined and supported by all major browsers:
AJAX
Advantages of AJAX include:
* Don't need to reload the whole page to send or get updated data * Added interactivity and responsiveness can be acheived * Works with ANY server-side language
Disadvantages of AJAX are:
* Doesn't work if JavaScript is disabled * Asynchronous nature can cause data contention or race problems when updating data
Domain processing
- How to keep track of current URL (JS only): http://webxadmin.free.fr/article/how-to-keep-track-of-current-url-33.php
- How to Get the Base URL with Javascript for a Domain or Localhost: http://www.gotknowhow.com/articles/how-to-get-the-base-url-with-javascript.aspx
- Get protocol, domain, and port from URL: https://stackoverflow.com/questions/6941533/get-protocol-domain-and-port-from-url
- Get domain name from any URL: http://bytes.com/topic/javascript/answers/835342-get-domain-name-url
- How can I get my Path?: http://bytes.com/topic/javascript/answers/152258-how-can-i-get-my-path
- Get any URL's path: http://stackoverflow.com/questions/4497531/javascript-get-url-path
URL parameters
- Get URL Parameters using Javascript: https://web.archive.org/web/20120216120424/http://www.netlobo.com/url_query_string_javascript.html
- Get URL Parameter names (list): https://web.archive.org/web/20120216120628/http://www.netlobo.com/comments/url_query_string_javascript (see comment with gpn function)
- How can I get query string values in JavaScript (modern way 2018+)? https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
- How to Display Dynamic Content on a Page Using URL Parameters: https://jennamolby.com/how-to-display-dynamic-content-on-a-page-using-url-parameters/
- How to get URL Parts (of current domain) in JavaScript: http://www.suite101.com/content/how-to-get-url-parts-in-javascript-a48335
- Escaping ampersand in URL: https://stackoverflow.com/questions/16622504/escaping-ampersand-in-url
Hash/Anchor
- How to get the URL anchor (hash) with Javascript: https://itsybitsybytes.com/how-to-get-the-url-anchor-with-javascript/
XHR
XMLHttpRequest (commonly abbreviated XHR) is a standard mechanism for creating requests to server-side components of an application (typically for passing or requesting data dynamically, in an AJAX-type call).
Firefox/Netscape/Opera/Safari/Chrome
http_request = new XMLHttpRequest();
- XMLHttpRequest Tests: http://www.mnot.net/javascript/xmlhttprequest/
- The XMLHttpRequest Object: http://www.w3schools.com/dom/dom_http.asp
- Using the XML HTTP Request object: http://jibbering.com/2002/4/httprequest.html
- AJAX - The XMLHttpRequest Object (readyState): http://www.w3schools.com/ajax/ajax_xmlhttprequest.asp
- Ajax (XMLHttpRequest object): http://www.javascriptkit.com/jsref/ajax.shtml
ActiveX Object
IE 5/6
http_request = new ActiveXObject("Microsoft.XMLHTTP");
IE 7/8
http_request = new ActiveXObject("Msxml2.XMLHTTP");
- XMLHttpRequest in IE: http://msdn.microsoft.com/en-us/library/ms535874%28VS.85%29.aspx
Requests
GET
http_request.open('GET', 'data.xml');
POST
http_request.open('POST', 'data.xml', true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.send(parameters);
PUT
http_request.open('POST', 'data.xml'); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader('X_METHODOVERRIDE', 'PUT');
DELETE
http_request.open('POST', 'data.xml'); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader('X_METHODOVERRIDE', 'DELETE');
Headers
Given the XHR instantiation above, you can set the request header using the following (after initializing the XMLHttpRequest object):
xhr.setRequestHeader('User-Agent', 'BC$');
You can also access the response Header as follows:
xhr.getResponseHeader('User-Agent');
[11] [12] [13] [14] [15] [16] [17]
Response Handler
The following code handles changes in state as a result of a request (i.e. response returned, errors, redirects, etc):
http_request.onreadystatechange=function(){ //ready to read response data if (mypostrequest.readyState==4) { //200 = HTTP status code for 'Successfully completed request' if (mypostrequest.status==200){ document.getElementById("result").innerHTML = http_request.responseText; //simply write raw text from response, in this example } else{ alert("ERROR: Could not make request") } }
}
Parse HTML
- JSFiddle -- parseHTML snippet example: https://jsfiddle.net/bcmoney/yrexd2va/
Content Injection
- HTMLCollection vs NodeList: https://medium.com/@layne_celeste/htmlcollection-vs-nodelist-4b83e3a4fb4b
Inner HTML
innerHTML is a DOM element for changing page elements and content dynamically, without reloading or refreshing the entire page.
- MozDev -- DOM - innerHTML: https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML
- MozDev -- Shadow DOM - innerHTML: https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/innerHTML
Inner Text
- MozDev -- DOM - innerText: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText
Text Content
- MozDev -- DOM - Text Content: https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
appendChild
- MozDev -- DOM - appendChild : https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild
createElement
- MozDev -- DOM - createElement: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
createTextNode
- MozDev -- DOM - createTextNode: https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNode
insertAdjacentElement
- MozDev -- DOM - insertAdjacentElement: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement
insertAdjacentHTML
- MozDev -- DOM - insertAdjacentHTML: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML
insertAdjacentText
- MozDev -- DOM - insertAdjacentText: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentText
replaceChild
- MozDev -- DOM - replaceChild: https://developer.mozilla.org/en-US/docs/Web/API/Node/replaceChild
- MozDev -- DOM - replaceChildren: https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceChildren
- When innerHTML isn’t Fast Enough: https://blog.stevenlevithan.com/archives/faster-than-innerhtml
removeChild
- How to remove all children of an element using JavaScript: https://attacomsian.com/blog/javascript-dom-remove-all-children-of-an-element
Callbacks
A callback is a function which is called from a reference. It is useful for delaying processing of a method.
For example, to set a time to wait before running the function:
setTimeout(callback, TIME)
where TIME is a millisecond representation like 1000 for 1 second.
For processing results of an XML HTTP Request (XHR) when they are ready
http_request.onreadystatechange = callback
Complete AJAX XHR callback example:
<html> <head> <script type="text/javascript"> function myFunction() { loadXMLDoc("ajax_info.txt",alertResponse); //can call alertResponse or showResponse or any other new method as a "callback" } function loadXMLDoc(url,_cfunc) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=(typeof _cfunc != "undefined") ? _cfunc : showResponse; xmlhttp.open("GET",url,true); xmlhttp.send(); } function showResponse() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } function alertResponse() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { alert(xmlhttp.responseText); } } </script> </head> <body> < div id="myDiv">Let AJAX change this text</div > <button type="button" onclick="myFunction()">Change Content</button> </body> </html>
Promise
"A promise object represents a value that may not be available yet. The primary method for interacting with a promise is its then method."[36]
- Promise spec: http://promises-aplus.github.io/promises-spec/[37]
- Promises: http://wiki.commonjs.org/wiki/Promises
- JavaScript Promises -- comprehensive introduction: https://web.dev/promises/
- How is a promise/defer library implemented?: http://stackoverflow.com/questions/17718673/how-is-a-promise-defer-library-implemented
- Promise polyfill: https://github.com/stefanpenner/es6-promise (2kb polyfill for Promises)[38][39][40][41][42][43]
[44] [45] [46] [47] [48] [49] [50] [51] [52] [53]
Fetch
- Fetch API spec: https://fetch.spec.whatwg.org/
- Using the Fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
- Introduction to fetch() : https://developers.google.com/web/updates/2015/03/introduction-to-fetch[54][55]
- window.fetch polyfill: https://github.com/github/fetch
- Background Fetch API: Get Ready To Use It!: https://medium.com/google-developer-experts/background-fetch-api-get-ready-to-use-it-69cca522cd8f
- Working with the Fetch API: https://developers.google.com/web/ilt/pwa/working-with-the-fetch-api
- Understanding the Fetch API: https://flaviocopes.com/fetch-api/
- Fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
- Ultimate Fetch API cheat sheet: https://medium.com/javascript-in-plain-english/the-ultimate-javascript-fetch-api-cheatsheet-e60b98c8cdbe
Async-Await
- Async/Await: https://javascript.info/async-await
- Making asynchronous programming easier with async and await: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await
WebWorkers
WebWorkers are like AJAX requests that run completely in the background on a separate thread outside of the main render/blocking thread of the browser instance. They are useful for any AJAX-like data fetching operations that take longer to process (and could even be beneficial in areas that simply have a chance of taking longer).
See also: HTML5 WebWorkers
Service Workers
Service Workers are a technology to help Proxy (intercept) all incoming and outgoing requests, modify it, return something immediately, or decide based on a caching policy whether or not it should try to fetch a response from the server.
if ('serviceWorker' in navigator) { navigator.serviceWorker.register('service-worker.js') .then(() => console.log('ServiceWorker installed')) .catch(err => console.log('Error: ', err)); } self.addEventListener('activate', (event) => { event.waitUntil( caches .open('my-sw-cache') .then(function(cache) { return cache.addAll([ 'main.js', 'main.css' ]); }) .then(function(){ console.log('ServiceWorker ready, assets cached'); }) ); });
- Mozilla -- ServiceWorkers 101: https://serviceworke.rs/
- Service Workers -- an Introduction: https://developers.google.com/web/fundamentals/primers/service-workers/
- Is your Web Browser ServiceWorker ready? (BROWSER GUIDE): https://jakearchibald.github.io/isserviceworkerready/
See also: HTML5 Service Workers
Beacons
- Beacon spec v1.0: https://www.w3.org/TR/beacon/[62]
- Navigator.sendBeacon(): https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon[63]
- Introduction to the Beacon API: https://www.sitepoint.com/introduction-beacon-api/
- Can I Use - Beacon: https://caniuse.com/#search=beacon
Same Origin Policy
The Same Origin Policy (also known as the Same Domain Policy) dates back to the days of Netscape and limits the sending of requests, data, objects or documents through JavaScript across separate domains, protocols, or port numbers.
- How to bypass the JavaScript (AJAX) Same Origin Policy: http://www.pascalbeyeler.com/?p=94
- f4a -- Flash-based cross-domain ajax requests: http://www.grouplite.com/f4a/
- Cross-Domain Ajax with Flash, not Ajax vs. Flash: http://flxhr.flensed.com/
- AJAX Same Origin Policy No More with Firefox 3.5: http://www.petefreitag.com/item/703.cfm
Server-side Proxy
- JavaScript -- Use a Web Proxy for Cross-Domain XMLHttpRequest Calls: http://developer.yahoo.com/javascript/howto-proxy.html
- ah-calls uses xhr (ajax), the Dynamic Script Tag technique, and an Application Proxy (php & curl) to make local and cross domain http calls asynchronously that can return json/xml/text(AHAH) as a string/object to a javscript callback function: http://www.codylindley.com/ahcalls/
- Cross-domain Ajax : http://domscripting.com/blog/display/91
- Cross Domain Ajax -- a Quick Summary: http://snook.ca/archives/javascript/cross_domain_aj/
- Fixing AJAX -- XMLHttpRequest Considered Harmful: http://www.xml.com/pub/a/2005/11/09/fixing-ajax-xmlhttprequest-considered-harmful.html?page=1
- Accessing External Resources With the XMLHttpProxy Client: https://ajax.dev.java.net/xmlhttpproxy.html
CORS
Cross-Origin Resource Sharing (CORS) is a specification that enables truly open access across domain-boundaries.
On the server-side, it is relatively straightforward to add support for CORS, requiring only the addition of a Header to the hosting server. The following line inside either the <Directory>, <Location>, <Files> or <VirtualHost> sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file:
Header set Access-Control-Allow-Origin "*"
When sent in a request/response header, it would look like the following:
Access-Control-Allow-Origin: *
-or-
Access-Control-Allow-Origin: http://sometrustedsite.com
One limitation of this new security mechanism is the inability to represent multiple domains, as such, you must either allow all sites to pull data from your APIs or pages (as per the example above), or, only respond back that you do or don't specific single site. The only way to "whitelist" multiple domains is to handle this on the server-side, perform a lookup and list that single allowed domain, for instance in Apache Web Server you could add the required header dynamically this way:
# ------------------------------------------------------------------------------ # Allow loading JavaScript, JSON, XML or CSS files to a list of trusted partners # ------------------------------------------------------------------------------ <FilesMatch "\.(js|json|xml|css)$"> <IfModule mod_headers.c> SetEnvIf Origin "http(s)?://(www\.)?(trustedsite1.com|trustedsite1.net|trustedsite2.ca|dev.trustedsite3.tv)$" AccessControlAllowOrigin=$0 Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin </IfModule> </FilesMatch>
On the client-side, XMLHTTPRequest2 supports a new withCredentials property that is required to be set to enable a CORS request to go out to a CORS-compliant/configured server. In IE which lacks XHR2, you can instead use XDomainRequest method. For simplicity, you could use the following function[68]:
function createCORSRequest(method, url) { var xhr = new XMLHttpRequest(); if ("withCredentials" in xhr) { // Check if the XMLHttpRequest object has a "withCredentials" property, which only exists on XMLHTTPRequest2 objects xhr.open(method, url, true); } else if (typeof XDomainRequest != "undefined") { // Otherwise, check for XDomainRequest, which exists in IE, and is IE's way of making CORS requests. xhr = new XDomainRequest(); xhr.open(method, url); } else { // Otherwise, CORS is not supported by the browser. xhr = null; } return xhr; }
- CORS spec: http://www.w3.org/TR/cors/[69] (NEW, as of FF3.6+,Opera10.6+,Safari5+,Chrome5+,IE9+)
- Mozilla Dev docs -- CORS HTTP Access Control: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS[70]
- Enable CORS: http://enable-cors.org/[71][72]
- Test CORS: http://test-cors.org (make test requests to APIs and endpoint URLs to see if they support CORS and certain features of it)
- AJAX Cross Domain library: http://ajax-cross-domain.com/
[73] [74] [75] [76] [77] [78] [79] [80] [81] [82]
- Access-Control-Allow-Credentials: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
CORP
- Cross-Origin Resource Policy (CORP): https://developer.mozilla.org/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)
CORB
- Cross-Oriring Resource Blocking (CORB): https://fetch.spec.whatwg.org/#corb
COOP
- Cross-Origin Opener Policy (COOP): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
COEP
Cross-Origin Embedder Policy (COEP): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy
Reverse AJAX
AJAX works by allowing us to fetch new content or data on demand, or at a set interval, as desired. However, sometimes we want data to flow in the other direction (from origin server towards our active/running application). In these cases, we can use a "Reverse AJAX" technique to push data from remote servers into our Web Application.
To realize Reverse AJAX, there are a few alternatives:
- HTML5 WebSockets (persistent connections with a server and Server-Sent Events for receiving messages as push notifications that can be processed in the DOM using JavaScript)
- Applet sockets (a predecessor of the emerging WebSockets standard, early Applets were the first to enable real-time communication using a dedicated TCP socket connection between client and server, that was only closed when the user closed the Applet or page it was embedded in)
- Slow-load (also called "Long-polling", uses keep-alive Connection and lengthy server-side maximum execution times to "wait" for new incoming data)
- Polling (simulates a real-time push connection by periodically checking on a set interval, with a small enough interval the data arrives in near-realtime)
- HTTP Streaming (also called long-lived HTTP, keeps connection alive between client and server even after data is delivered, until expiration timestamp is passed)
- Comet (aka long-held HTTP, once client requests an endpoint, the server returns the data as slowly as possible, trying to maintain an open connection for as long as possible, using "no timeouts")
- Piggyback (aka "store and forward", new data arrives at the server and gets stored, the client makes an unrelated request and the Reverse AJAX data gets appended on top of the unrelated response, usually with some form of divider or header to identify where the unrelated data starts and ends)
- META refresh in hidden iFrame (aka poor-man's Reverse AJAX, simply refresh the page on a set interval so it can be updated, then the contents of the iFrame can be grabbed... refreshing the iFrame too often can affect server load times)
Pushlets
- Pushlets: http://www.pushlets.com/
- Pusher API: https://pusher.com/docs/rest_api[90]
DWR
- DWR - Direct Web Remoting: http://directwebremoting.org/dwr/
- DWR - Configuring Reverse Ajax: http://directwebremoting.org/dwr/reverse-ajax/configuration.html
- DWR - Reverse Ajax with DWR: http://ajaxian.com/archives/reverse-ajax-with-dwr
- DWR - Writing JavaScript with DWR: http://directwebremoting.org/dwr/introduction/scripting-dwr.html
- Direct Web Remoting (DWR) lesson: http://www.javapassion.com/ajaxcodecamp/#Direct_Web_Remoting_DWR
Comet
- Comet (Ajax Push, Reverse Ajax) lesson: http://www.javapassion.com/ajaxcodecamp/#Comet
- CometD -- Dojo Toolkit: http://cometdproject.dojotoolkit.org/
- Comep -- the PHP-Comet-Server: https://sourceforge.net/projects/comet/
Kaazing
- Kaazing WebSocket Gateway: http://kaazing.com/download.html
APE
- Ajax Push Engine (APE): http://www.ape-project.org/
JMS
Libraries
- Javascript Libraries: http://javascriptlibraries.com/
See: JavaScript
COMET
- How to implement COMET with PHP: http://www.zeitoun.net/articles/comet_and_php/start
- Concrete Comet Examples: http://cometdaily.com/2009/10/23/concrete-comet-examples/
LightStreamer
- Lightstreamer - a scalable and reliable Server for (COMET) pushing live data to Rich Internet Applications: http://www.lightstreamer.com/index.htm
AHAH
- AHAH -- Asynchronous HTML and HTTP : http://microformats.org/wiki/rest/ahah
Orbited
Orbited provides a pure JavaScript/HTML socket in the browser. It is a web router and firewall that allows you to integrate web applications with arbitrary back-end systems. You can implement any network protocol in the browser—without resorting to plugins.
- Orbited: http://orbited.org/
Tools
- Test CORS tool: http://www.test-cors.org/
- AJAX loading icon generator: http://www.ajaxload.info/
- AJAX Loading animated GIF creator: https://loading.io/ (fancy)
Open Source (Free)
- Prototype: http://www.prototypejs.org/
- Mootools: http://mootools.net
- Script.acu.lo.us: http://script.acu.lo.us
- Dojo: http://dojotoolkit.org
- jQuery: http://jquery.com
- Interface (visual components for jQuery): http://interface.eyecon.ro/
- JavaScript MVC: http://www.javascriptmvc.com
- DOMAssistant: http://www.domassistant.com/
- ajaxmessaging -- Bring real time messaging to Ruby on Rails using AJAX Polling and custom mongrel handler: http://code.google.com/p/ajaxmessaging/
- Object.Event & Extensions: http://livepipe.net/core
Open Source (Commercial)
- YUI (Yahoo! User Interface) components library: http://developer.yahoo.com/yui/
- GWT (Google Web Toolkit): http://code.google.com/webtoolkit/
- EXT JS - Javascript library: http://extjs.com/
- Bindows™ - The #1 Ajax Framework: http://www.bindows.net/
- InfiView™ - The Ajax Framework for Data Visualization: http://www.infiview.com/
- HighSlide: http://www.highslide.com/
Closed Source (Free)
- WaveMaker's Visual AJAX studio: http://www.wavemaker.com/
Closed Source (Commercial)
- Backbase (Visual AJAX Builder): http://www.backbase.com/products/visual-ajax-builder/
- Basecamp (also available as free version for non-profits): http://basecamp.com
Resources
- Modern AJAX -- You Don't Need jQuery!: https://blog.garstasio.com/you-dont-need-jquery/ajax/ (includes useful sections on POST, data encoding, CORS withCredentials, etc)
- MDN -- Asynchronous JavaScript + XML (AJAX) guide: https://developer.mozilla.org/en-US/docs/Web/Guide/AJAX
- MDN -- XMLHttpRequest.withCredentials: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials
- MINIAJAX (Excellent AJAX Examples): http://miniajax.com/
- XMLHttpRequest object -- EXAMPLES: http://help.dottoro.com/ljspgwvf.php
- XML Messages: http://ajaxpatterns.org/XML_Message
- API HTTP REST Standard Universal Web: http://ajaxpatterns.org/RESTful_Service
- Call External PHP with JavaScript (an vice-versa): http://www.webmasterworld.com/javascript/3671533.htm
- Data Retrieve from Mysql using AJAX with PHP: http://www.weberdev.com/get_example-4389.html
- Google AJAX Libraries API: http://code.google.com/apis/ajaxlibs/documentation/ (offload hosting of popular JS libs to Google's servers)
- OpenAJAX (alliance around building standards/data specs for AJAX): http://www.openajax.org/
- XMLHttpRequest.js - Standard-compliant cross-browser XMLHttpRequest object implementation: http://code.google.com/p/xmlhttprequest/
- JKL.ParseXML is a JavaScript library that let you convert an XML into a JavaScript object (JSON).: http://www.kawa.net/works/js/jkl/parsexml-e.html
- XML AJAX: http://knol.google.com/k/-/xml-ajax/15yxznd62blu0/10#
- HTML DOM Properties and Methods: http://www.w3schools.com/htmldom/dom_methods.asp
- Unobtrusive Ajax (free eBook): http://www.thefutureoftheweb.com/blog/free-book-unobtrusive-ajax
- window.fetch() & XMLHttpRequest benchmarks: https://github.com/arendjr/fetch-vs-xhr-perf
- Lightbox clone comparison (TABLE): http://planetozh.com/projects/lightbox-clones/
- ContentFlow: http://www.jacksasylum.eu/ContentFlow/
Tutorials
- Introduction to XMLHttpRequest Level 2: http://dev.opera.com/articles/view/xhr2/
- New Tricks in XMLHttpRequest2: https://www.html5rocks.com/en/tutorials/file/xhr2/
- Need to do Dependency-Free AJAX?: https://css-tricks.com/need-dependency-free-ajax/ (new "fetch" built-in JS function allows Promise-based AJAX calls)
- Deep dive into the murky waters of script loading: https://www.html5rocks.com/en/tutorials/speed/script-loading/
- AJAX ("XHR 1.0 uncovered") -- A New Approach to Web Applications: http://adaptivepath.org/ideas/ajax-new-approach-web-applications/
- Ajax Tutorial (Asynchronous Javascript + XML): https://www.xul.fr/en-xml-ajax.html
- Detect an AJAX Request in PHP: https://davidwalsh.name/detect-ajax
- IBM Developer Tutorials - Mastering AJAX Series (Pt.1 - Intro. to AJAX): http://www-128.ibm.com/developerworks/web/library/wa-ajaxintro1.html?ca=dgr-lnxw01MasterAJAX
- Load JS scripts asynchronously: https://stackoverflow.com/questions/7718935/load-scripts-asynchronously
- JavaScript Madness - Dynamic Script Loading: https://unixpapa.com/js/dyna.html
- HTML5’s async Script Attribute: https://davidwalsh.name/html5-async
- AJAX/Javascript XML Processing Example/Tutorial: http://www.captain.at/howto-ajax-process-xml.php
- Use XForms and AJAX to create an autosuggest form field: http://www.ibm.com/developerworks/library/x-xformssuggest/?S_TACT=105AGX59&S_CMP=GR&ca=dgr-lnxw02aXFormsSuggest
- Lightning Fast Filtering in JavaScript: https://chrissmith.xyz/lightning-fast-filtering-in-javascript/ (Auto-Suggest type feature)
- Asynchronous JavaScript Technology and XML (Ajax) With the Java Platform: http://java.sun.com/developer/technicalArticles/J2EE/AJAX/
- Enhancing the User Interface with AJAX libraries (Dojo, Scriptaculous, jQuery, Mootools): http://www.packtpub.com/article/enhancing-the-user-interface-with-ajax
- Designing a JavaScript client for a REST API: http://www.ajax-blog.com/designing-a-javascript-client-for-a-rest-api.html
- Create an asynchronous message framework with Ajax and Apache Geronimo: http://www.ibm.com/developerworks/library/os-ag-asynchajax/index.html?ca=drs-
- Creating an Ajax-Enabled Application, a Phase Listener Approach: http://java.sun.com/developer/technicalArticles/J2EE/hands-on/legacyAJAX/compB/
- XML processing in Ajax, Part 2: Two Ajax and XSLT approaches: http://www.ibm.com/developerworks/xml/library/x-xmlajaxpt2/
- Tutorial -- Retrieving Page Elements via the DOM: http://www.elated.com/articles/javascript-retrieving-page-elements-via-the-dom/
- AJAX and XML -- Five common Ajax patterns: http://www.ibm.com/developerworks/xml/library/x-ajaxxml2/
- Multiple File Upload Magic With Unobtrusive Javascript: http://15daysofjquery.com/multiple-file-upload-magic-with-unobtrusive-javascript/17/
- SimpleComet, HTTP streaming and toilet scrubbing: http://mandor.net/2008/12/23/12-simplecomet-http-streaming-and-toilet-scrubbing
- Real time notifications with PHP: http://gonzalo123.com/2011/03/14/real-time-notifications-with-php/
- How to implement COMET with PHP: http://www.zeitoun.net/articles/comet_and_php/start
- Changing textbox value from dropdown list using Ajax and PHP: http://roshanbh.com.np/2008/09/change-textbox-value-dropdown-list-ajax-php.html
- Tutorial -- From (Database) to PHP to XML to jQuery AJAX to DOM: http://www.reynoldsftw.com/2009/03/tutorial-from-php-to-xml-to-jquery-and-ajax/
- How to dynamically return XML data using PHP: http://blog.jc21.com/2006-09-07/how-to-dynamically-return-xml-data-using-php
- Strategies for dealing with multiple Ajax calls (tacticle feedback & errors .vs. blocking .vs. cancellation): http://java.dzone.com/articles/strategies-dealing-multiple
- Digging deeper into HTTP ready states: http://www.yaldex.com/wAjax/DiggingdeeperintoHTTPreadystates.html
- Set a request header in JavaScript: http://stackoverflow.com/questions/1268673/set-a-request-header-in-javascript
- How to do HTTP Basic Auth in Ajax: http://coderseye.com/2007/how-to-do-http-basic-auth-in-ajax.html
- Re-inventing AJAX's XMLHttpRequest -- Cross-browser implementation with sniffing capabilities: http://www.ilinsky.com/articles/XMLHttpRequest/ (library to circumvent older browsers' AJAX quirks)
- ClubAJAX -- Plain Text vs innerText vs textContent: https://web.archive.org/web/20160304065420/http://clubajax.org/plain-text-vs-innertext-vs-textcontent/ | DEMO | SRC[96][97][98][99][100]
- Pure JS long-polling for chat: https://stackoverflow.com/questions/19617033/pure-javascript-longpolling-for-chat
- How to Make AJAX Requests With Raw Javascript: https://code.tutsplus.com/articles/how-to-make-ajax-requests-with-raw-javascript--net-4855
- An Example of AJAX With Vanilla JavaScript: https://webdesign.tutsplus.com/tutorials/an-example-of-ajax-with-vanilla-javascript--cms-25763
- jQuery index() in vanilla Javascript: https://stackoverflow.com/questions/13658021/jquery-index-in-vanilla-javascript
- Understand JavaScript Callback Functions and how to use them: http://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/
- Callback Hell: http://callbackhell.com/
- Saved from Callback Hell: https://www.sitepoint.com/saved-from-callback-hell/
- Asynchronous JavaScript -- From Callback Hell to Promises to Async & Await: https://lnubla.wordpress.com/2018/01/23/asynchronous-javascript-from-callback-hell-to-async-and-await/
- 6 Reasons Why JavaScript Async/Await Blows Promises Away: https://medium.com/hackernoon/6-reasons-why-javascripts-async-await-blows-promises-away-tutorial-c7ec10518dd9
- Node.js Async Best Practices & Avoiding the Callback Hell: https://blog.risingstack.com/node-js-async-best-practices-avoiding-callback-hell-node-js-at-scale/
- An example of async/await hell: https://medium.freecodecamp.org/avoiding-the-async-await-hell-c77a0fb71c4c (apparently the popular "callback hell" solution can suffer its own problems)
- Why you should always append DOM elements using DocumentFragments: https://coderwall.com/p/o9ws2g/why-you-should-always-append-dom-elements-using-documentfragments
- How to Load Third-Party Scripts Dynamically in (modern) JavaScript: https://cleverbeagle.com/blog/articles/tutorial-how-to-load-third-party-scripts-dynamically-in-javascript
- Dynamically add script tag with src that may include document.write: https://stackoverflow.com/questions/13121948/dynamically-add-script-tag-with-src-that-may-include-document-write
- Vanilla JavaScript Data Binding: https://gist.github.com/austinhyde/4321f22a476e1cbee65f | DEMO
- Intercept page exit event: https://stackoverflow.com/questions/1704533/intercept-page-exit-event
External Links
- wikipedia: XMLHttpRequest
- AJAX - A New Approach to Web Applications: https://web.archive.org/web/20130821072916/http://www.adaptivepath.com/ideas/ajax-new-approach-web-applications (the original academic article on AJAX use at Google/Microsoft)
- Very Dynamic Web Interfaces: https://web.archive.org/web/20130827112350/http://www.xml.com/pub/a/2005/02/09/xml-http-request.html
- Methods of communication (2011): http://html5doctor.com/methods-of-communication/
- WebMasterWorld Forum - Processing PHP Form from SAME PAGE: http://www.webmasterworld.com/php/3225225.htm
- Convert XML to String and append to page: https://stackoverflow.com/questions/9898698/convert-xml-to-string-and-append-to-page
- 'Unterminated String constant' error in javascript!: http://forums.devarticles.com/javascript-development-22/unterminated-string-constant-error-in-javascript-11835.html
- SCRIPT7002 -- XMLHttpRequest - Network Error 0x2ef3, Could not complete the operation due to error 00002ef3: https://stackoverflow.com/questions/14527387/script7002-xmlhttprequest-network-error-0x2ef3-could-not-complete-the-operati
- Featured Content Slider v2.4: http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
- Alphabetical DropDown Menu In JSP (without AJAX): http://www.roseindia.net/jsp/user-search.shtml
- COMPLETE Directory of Ajax Applications: http://www.alvit.de/web-dev/ajax-applications.html
- Stop using Ajax!: http://dev.opera.com/articles/view/stop-using-ajax/
- AJAX -- Usable Interactivity with Remote Scripting: http://www.sitepoint.com/article/remote-scripting-ajax/
- JavaScript -- Make Yahoo! Web Service REST Calls with JavaScript and XMLHttpRequest: http://developer.yahoo.com/javascript/howto-ajax.html
- Ajax Examples: http://www.roseindia.net/ajax/ajax-examples.shtml
- 120+ Javascript, Ajax, jQuery Mega Toolbox: http://www.tripwiremagazine.com/tools/developer-toolbox/javascript-ajax-jquery-mega-toolbox.html#mobile
- Make Your JavaScript Data Model Smarter – With Object.Event: http://www.gen-x-design.com/archives/make-your-data-javascript-data-model-smarter/
- Processing XML Data from AJAX Responses with JavaScript : http://www.devarticles.com/c/a/JavaScript/Processing-XML-Data-from-AJAX-Responses-with-JavaScript/
- Ajax and XML -- Five Ajax anti-patterns: http://www.ibm.com/developerworks/xml/library/x-ajaxxml3/index.html
- A List for The Most Complete AJAX Framework and JavaScript Libraries: http://dobeweb.com/2008/a-list-for-the-most-complete-ajax-framework-and-javascript-libraries.html
- Using POST method in XMLHTTPRequest(Ajax): http://www.openjs.com/articles/ajax_xmlhttp_using_post.php
- ajax-poller: http://www.dhtmlgoodies.com/index.html?whichScript=ajax-poller
- Do not use the innerHTML property on HTML objects: http://www.javascriptkata.com/2007/04/17/do-not-use-the-innerhtml-property-on-html-objects/
- XML DOM appendChild() Method: http://www.w3schools.com/dom/met_element_appendchild.asp
- Break your innerHTML addiction: http://www.bestcodingpractices.com/break_your_innerhtml_addiction-2719.html
- Go Forth and API -- AJAX-friendly APIs: http://carsonified.com/blog/features/ajax/go-forth-and-api/
- Fast, Scalable, Streaming AJAX Proxy - continuously deliver data from across domains: http://www.codeproject.com/KB/ajax/ajaxproxy.aspx
- JSP Proxy code for sourcing cross-domain Images: http://raghuonflex.wordpress.com/2007/10/11/jsp-proxy-code-for-sourcing-cross-domain-images/
- Ajax ToDo List: http://labs.mininova.org/todolist2/
- Ajax Examples and Demos (XMLHttpRequest): http://www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples
- Generalized AJAX Response Handling for XML Content: http://www.devx.com/webdev/Article/28695/1954
- How To Use AJAX Patterns: http://www.peachpit.com/articles/article.aspx?p=439600
- FREE AJAX 18-week course: http://www.javapassion.com/ajaxcodecamp/
- Ajax, Flex or Silverlight?: http://cometdaily.com/2009/03/30/comet-ajax-flex-and-silverlight/
- XML and Ajax: http://www.learn-ajax-tutorial.com/XmlAjax.cfm
- Evaluate scripts while working on AJAX Requests: http://www.developersnippets.com/2009/05/20/evaluate-scripts-while-working-on-ajax-requests/
- XMLHTTP notes -- readyState and the events: http://www.quirksmode.org/blog/archives/2005/09/xmlhttp_notes_r_2.html
- Dynamic HTML and XML -- The XMLHttpRequest Object: http://developer.apple.com/internet/webcontent/xmlhttpreq.html
- How Hard is AJAX Coding ...: http://www.ajaxlines.com/ajax/stuff/article/how_hard_is_ajax_coding.php
- Apple Developer Connection - Dynamic HTML and XML -- The XMLHttpRequest Object: http://developer.apple.com/internet/webcontent/xmlhttpreq.html
- Ajax security surprises: web-aggregators, offline applications and frameworks: http://www.pathf.com/blogs/2008/01/ajax-security-s/
- Facebook and MySpace security -- backdoor wide open, millions of accounts exploitable: http://www.yvoschaap.com/index.php/weblog/facebook_myspace_accounts_hijacked/
- AjaxLoad (loading/waiting screen for AJAX): http://ajaxload.info/
- Registering JavaScript object methods as callbacks: http://bitstructures.com/2007/11/javascript-method-callbacks
- Performing POST requests using Ajax: http://www.javascriptkit.com/dhtmltutors/ajaxgetpost2.shtml
- Using POST method in XMLHTTPRequest(Ajax): http://www.openjs.com/articles/ajax_xmlhttp_using_post.php
- Login using Ajax and PHP : http://woork.blogspot.com/2007/10/login-using-ajax-and-php.html
- HTTP Form POST Request using AJAX and JSP/Servlet: http://www.hiteshagrawal.com/ajax/http-form-post-request-using-ajax-and-servlet
- HTTP FORM POST in PHP using AJAX: http://www.hiteshagrawal.com/ajax/form-post-in-php-using-ajax
- 10 Auto Complete Ajax Scripts: http://webtecker.com/2008/03/10/10-auto-complete-ajax-scripts/
- 21+ Fresh Ajax CSS Tables: http://www.noupe.com/css/21-fresh-ajax-css-tables.html
- 47+ Excellent Ajax CSS Forms: http://www.noupe.com/css/47-excellent-ajax-css-forms.html
- 37+ Great Ajax, CSS Tab-Based Interfaces: http://www.noupe.com/javascript/37-great-ajax-css-tab-based-interfaces.html
- Ajax cross-domain: http://winhlp.com/node/699
- Interacting With The Web - The XMLHttpRequest Object: http://code.google.com/apis/desktop/articles/e9.html
- nodeValue vs innerHTML and textContent. How to choose?: https://stackoverflow.com/questions/21311299/nodevalue-vs-innerhtml-and-textcontent-how-to-choose
- Intercepting beacons through service workers: https://ehsanakhgari.org/blog/2015-04-08/intercepting-beacons-through-service-workers
- Ajax Mistakes: https://alexbosworth.backpackit.com/pub/67688
- Chrome deprecating, then getting rid of Synchronous XHRs: https://developers.google.com/web/updates/2012/01/Getting-Rid-of-Synchronous-XHRs
- AJAX -- any advantages to using jQuery's .ajax() instead of XMLHttpRequest?: https://stackoverflow.com/questions/4271486/ajax-advantages-to-using-jquerys-ajax-instead-of-xmlhttprequest
References
- ↑ For more info check out the wikipedia page on AJAX: wikipedia:AJAX
- ↑ AJAX -- Introduction and Advantage: http://ajaxblog.com/archives/2009/01/25/ajax-introduction-and-advantage
- ↑ Why use AJAX?: http://www.interaktonline.com/support/articles/Details/AJAX:+Asynchronously+Moving+Forward-Why+use+AJAX%3F.html?id_art=36&id_asc=309
- ↑ Troubles with Asynchronous Ajax Requests and PHP Sessions: http://www.chipmunkninja.com/Troubles-with-Asynchronous-Ajax-Requests-g@
- ↑ Javascript function to get URL query string parameters: https://snipplr.com/view/13239/javascript-function-to-get-url-query-string-parameters
- ↑ Get URL Parameters with JavaScript: https://html-online.com/articles/get-url-parameters-javascript/
- ↑ How to Get URL Query Parameters with Javascript (process with for each): https://usefulangle.com/post/78/javascript-get-url-parameters
- ↑ How to get URL parameter using jQuery or plain JavaScript?: https://stackoverflow.com/questions/19491336/how-to-get-url-parameter-using-jquery-or-plain-javascript
- ↑ An absolute Guide to JavaScript Http Requests (XHR .vs. Fetch .vs. Axios lib): https://medium.com/javascript-in-plain-english/an-absolute-guide-to-javascript-http-requests-44c685edfa51
- ↑ Why JavaScript Developers Should Prefer Axios Over Fetch: https://betterprogramming.pub/why-javascript-developers-should-prefer-axios-over-fetch-294b28a96e2c
- ↑ The XMLHttpRequest Object: http://www.w3.org/TR/2007/WD-XMLHttpRequest-20070618/#dfn-setrequestheader
- ↑ Understanding User-Agent Strings: http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx
- ↑ Accessing the web page's HTTP Headers in JavaScript: https://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript
- ↑ How to read/get response header from AJAX/HTTP/Service/API call or response: https://medium.com/@jsguyhenry/how-to-read-get-response-header-from-ajax-http-service-api-call-or-response-c873c5fbf9b8
- ↑ jQuery - get AJAX response headers: https://stackoverflow.com/questions/11440918/jquery-get-ajax-response-headers
- ↑ jQuery and AJAX response header: https://stackoverflow.com/questions/1557602/jquery-and-ajax-response-header
- ↑ jQuery & AJAX response header: https://cmsdk.com/node-js/jquery-and-ajax-response-header.html
- ↑ W3Schools - InnerHTML: http://www.w3schools.com/htmldom/prop_anchor_innerhtml.asp
- ↑ Writing Dynamic Content with JavaScript: http://jennifermadden.com/javascript/dhtml/dynamicLayerContent.html
- ↑ innerHTML & DOM Methods: https://web.archive.org/web/20111218002440/http://www.dustindiaz.com/innerhtml-vs-dom-methods/
- ↑ Why innerHTML can ruin your AJAX applications http://blog.systemcoder.com/2006/12/why-innerhtml-can-ruin-your-ajax.html
- ↑ The Problem With innerHTML http://www.julienlecomte.net/blog/2007/12/38/
- ↑ The innerHTML dilemma: http://domscripting.com/blog/display/35
- ↑ BetterInnerHTML - an alternative to innerHTML: http://www.optimalworks.net/resources/betterinnerhtml/
- ↑ An ultimate alternative solution to innerHTML: http://www.optimalworks.net/blog/2007/web-development/javascript/innerhtml-alternative
- ↑ JavaScript append: https://www.javascripttutorial.net/javascript-dom/javascript-append/
- ↑ innerHTML vs appendChild() - Which approach is better?: https://marian-caikovski.medium.com/innerhtml-vs-appendchild-e74c763846df
- ↑ Important difference between standard HTML tables and div tables: https://medium.com/geekculture/important-difference-between-standard-html-tables-and-div-tables-b6b094ec2c79
- ↑ Illustration for post innerHTML vs appendChild(): https://innerhtmlvsappendchild.onrender.com
- ↑ innerHTML vs createElement: http://cute-solutions.blogspot.com/2006/07/innerhtml-vs-createelement.html
- ↑ What is faster to insert into DOM— HTML or DOM nodes?: https://medium.com/codex/what-is-faster-to-insert-into-dom-html-or-dom-nodes-ff11586f8570
- ↑ Modern alternatives to innerHTML and appendChild(): https://marian-caikovski.medium.com/modern-alternatives-to-innerhtml-and-appendchild-296b9e5a5d28
- ↑ W3schools -- Element Object - removeChild() method: https://www.w3schools.com/jsref/met_node_removechild.asp | DEMO
- ↑ How to clear the content of a div using JavaScript?: https://www.geeksforgeeks.org/how-to-clear-the-content-of-a-div-using-javascript/
- ↑ Try this Editor: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_callback
- ↑ Mozilla Dev - Javascript Promises: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
- ↑ Promise/A+ spec on GitHub: https://github.com/promises-aplus/promises-spec/blob/1.0.0/README.md
- ↑ Q - the asynch JS Promise library: http://documentup.com/kriskowal/q/ SRC | DOCS | EXAMPLES
- ↑ Q - httpReadRetry example: https://gist.github.com/kriskowal/593052
- ↑ BluebirdJS: http://bluebirdjs.com/docs/getting-started.html | SRC (Promise polyfill lib)
- ↑ Native Promise ONLY: https://github.com/getify/native-promise-only
- ↑ A small embeddable Promise polyfill: https://github.com/bramstein/promis
- ↑ Lightweight ES6/A+ compliant Promise Polyfill: https://github.com/taylorhakes/promise-polyfill
- ↑ MozDev -- Promise API: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
- ↑ JavaScript Promise API: https://davidwalsh.name/promises
- ↑ Aren't promises just callbacks?: https://stackoverflow.com/questions/22539815/arent-promises-just-callbacks/22562045#22562045
- ↑ What is the "explicit Promise construction" antipattern and how do I avoid it?: https://stackoverflow.com/questions/23803743/what-is-the-explicit-promise-construction-antipattern-and-how-do-i-avoid-it
- ↑ Function that retries with setTimeout: https://stackoverflow.com/questions/31922159/javascript-function-that-retries-with-settimeout
- ↑ Promise Retry Design Patterns: https://stackoverflow.com/questions/38213668/promise-retry-design-patterns/44577075#44577075
- ↑ Promises -- Repeat operation until it succeeds?: https://stackoverflow.com/questions/26694467/promises-repeat-operation-until-it-succeeds#26694802
- ↑ Promises and setTimeout: https://stackoverflow.com/questions/42771837/promises-and-settimeout#42774486
- ↑ Wrapping jQuery AJAX requests with simple Promises: https://codepen.io/aevanson/pen/mGVNaR
- ↑ Promises in "vanilla JS": https://medium.com/@vikingjonsson/promises-in-vanilla-js-10588e629abb
- ↑ Fetch API: https://davidwalsh.name/fetch
- ↑ Introduction to the Fetch API: https://www.sitepoint.com/introduction-to-the-fetch-api/
- ↑ Using Fetch: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
- ↑ Async Await JavaScript Tutorial – How to Wait for a Function to Finish in JS: https://www.freecodecamp.org/news/async-await-javascript-tutorial/
- ↑ How To Use Async and Await In JavaScript: https://www.js-tutorials.com/javascript-tutorial/how-to-use-async-and-await-in-javascript/
- ↑ NodeJS -- Modern Asynchronous JavaScript with Async and Await: https://nodejs.dev/learn/modern-asynchronous-javascript-with-async-and-await
- ↑ How To Master Async/Await With This Real World Example: https://medium.com/free-code-camp/how-to-master-async-await-with-this-real-world-example-19107e7558ad (real-time currency converter example)
- ↑ Using async/await in a forEach loop (HINT: you can’t): https://blog.devgenius.io/using-async-await-in-a-foreach-loop-you-cant-c174b31999bd
- ↑ Beacon spec (LATEST): https://w3c.github.io/beacon/
- ↑ Beacon API: https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API
- ↑ Understanding Web Security Checks in Firefox (Part 1): https://blog.mozilla.org/attack-and-defense/2020/06/10/understanding-web-security-checks-in-firefox-part-1/
- ↑ Access-Control-Allow-Origin M+ultiple Origin Domains?: https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains
- ↑ Setting CORS (cross-origin resource sharing) on Apache with correct response headers allowing everything through: https://benjaminhorn.io/code/setting-cors-cross-origin-resource-sharing-on-apache-with-correct-response-headers-allowing-everything-through/
- ↑ Vary -- origin response header and CORS exploitation: https://security.stackexchange.com/questions/151590/vary-origin-response-header-and-cors-exploitation#151596
- ↑ Using CORS: http://www.html5rocks.com/en/tutorials/cors/
- ↑ wikipedia: Cross-origin resource sharing
- ↑ Browser Support Table - CORS: http://caniuse.com/cors
- ↑ CORS-Compliant REST API with Jersey and ContainerResponseFilter: http://blog.usul.org/cors-compliant-rest-api-with-jersey-and-containerresponsefilter/
- ↑ CORS-enable Tomcat - Why REST with JSONP when you can CORS?: http://sunnytalkstech.blogspot.ca/2012/01/why-rest-with-jsonp-when-you-can-cors.html (Tomcat)
- ↑ Cookies With My CORS: https://quickleft.com/blog/cookies-with-my-cors/
- ↑ Cross-site XMLHttpRequest with CORS: https://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
- ↑ Putting it all together – CORS tutorial for IIS: https://blogs.msdn.microsoft.com/friis/2017/11/24/putting-it-all-together-cors-tutorial/
- ↑ Understanding CORS (in Spring): https://spring.io/understanding/CORS
- ↑ Understanding and using CORS (in RESTlet): http://restlet.com/company/blog/2015/12/15/understanding-and-using-cors/
- ↑ Making Cross-Domain Requests with CORS: https://www.eriwen.com/javascript/how-to-cors/
- ↑ How to use CORS to access Google APIs: https://developers.google.com/api-client-library/javascript/features/cors
- ↑ HTML5 - CORS: https://www.tutorialspoint.com/html5/html5_cors.htm
- ↑ CORS request - why are the cookies not sent?: https://stackoverflow.com/questions/8863571/cors-request-why-are-the-cookies-not-sent#8870830
- ↑ Basics of CORS (Cross-Origin Resource Sharing): https://dzone.com/articles/basics-of-cors
- ↑ Mozilla Dev docs -- Is Access-Control-Allow-Origin: * insecure?: https://advancedweb.hu/2019/11/12/cors_star/
- ↑ Safely reviving shared memory (with evolving W3C recommended COOP & CORE HTTP headers): https://hacks.mozilla.org/2020/07/safely-reviving-shared-memory/
- ↑ wikipedia: Reverse Ajax
- ↑ The Slow Load Technique/Reverse AJAX - Simulating Server Push in a Standard Web Browser: http://www.obviously.com/tech_tips/slow_load_technique
- ↑ Using Server Push (aka Reverse AJAX): http://biese.wordpress.com/2009/03/03/using-server-push-aka-reverse-ajax/
- ↑ Exploring Reverse AJAX: http://gmapsdotnetcontrol.blogspot.com/2006/08/exploring-reverse-ajax-ajax.html
- ↑ Google -- Polling Like It's the 90s: https://dzone.com/articles/google-polling-like-its-the-90s ( technical review of the live score feature in Google search results)
- ↑ Building an iOS photo feed with Pusher and Raspberry Pi: https://blog.pusher.com/building-ios-photo-feed-pusher-raspberry-pi/
- ↑ Inject a script tag with remote src and wait for it to execute: https://stackoverflow.com/questions/8578617/inject-a-script-tag-with-remote-src-and-wait-for-it-to-execute
- ↑ Understanding the Async JS event loop: https://blog.bitsrc.io/understanding-asynchronous-javascript-the-event-loop-74cd408419ff
- ↑ JSL (JavaScript Loader): www.andresvidal.com/jsl#jsl.load
- ↑ $script.js – Another JavaScript loader & dependency manager: https://web.archive.org/web/20110224163338/http://dustindiaz.com/scriptjs | SRC
- ↑ 用 asyncJS 异步加载 JavaScript: https://ljw.me/2013/10/20/asyncjs.html | SRC
- ↑ Element innerText/textContent for all browsers: http://perrymitchell.net/article/element-innertext-textcontent-for-all-browsers/
- ↑ 'innerText' works in IE, but not in Firefox: https://stackoverflow.com/questions/1359469/innertext-works-in-ie-but-not-in-firefox/1359822#1359822
- ↑ innerText vs innerHtml vs label vs text vs textContent vs outerText: https://stackoverflow.com/questions/24427621/innertext-vs-innerhtml-vs-label-vs-text-vs-textcontent-vs-outertext
- ↑ innerText vs. textContent: https://kellegous.com/j/2013/02/27/innertext-vs-textcontent/
- ↑ The poor, misunderstood innerText: http://perfectionkills.com/the-poor-misunderstood-innerText/
- ↑ What is callback hell?: https://www.quora.com/What-is-callback-hell?share=1
See Also
JavaScript | XML | JSON | jQuery | HTML5 | xHTML | HTML | DHTML | Drag & Drop | CORS | JSP | C#