Callbacks are the cornerstone of JavaScript since it is single-threaded in nature. This can quickly turn into spaghetti code when handling multiple, dependent AJAX calls. Enter Promises! Deferred and promise are part of jQuery since version 1.5 and they help in handling asynchronous functions like AJAX.
How to avoid loading jQuery twice with RequireJS
When working with existing sites or content management systems, you have little say on where and when jQuery is loaded. To complicate matters, some pages may have jQuery auto-loaded, and others may not (yay for performance boosts, nay for client-side plugins). Do you bite the bullet and write unmanageable scripts? Or do you believe in RequireJS and dodge the bullet matrix-style?
Sending Request Headers via jQuery AJAX
Ever wanted to send request headers from jQuery instead of the “code-behind”? You can easily tweak the ajaxSetup object to do this.