jQuery Deferred progress() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Deferred

Definition

deferred.progress() adds handlers that run when the Deferred sends progress notifications with notify() or notifyWith(). It is available since jQuery 1.7 and returns the same Deferred for chaining.

Syntax

Start with these common calls. Keep them short and readable.

jQuery
deferred.progress(progressCallbacks)

progress()  → listen for updates
notify()    → emit an update (owner)
done()      → final success
fail()      → final failure

progress can run many times while pending
native Promise has no progress API
CallWhat it does
progressCallbacksFunction or array of functions
Extra callback argsMore functions / arrays on the same call
ReturnSame Deferred (chainable)
SincejQuery 1.7

Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.

Parameters

ParameterDescription
Step 1Create a Deferred (or receive one from an async helper).
Step 2Call progress(fn) — optionally add more handlers or arrays of handlers.
Step 3While work runs, call notify(args…) to fire those handlers.

Return Value

Return ValueDescription
See examplesCheck the examples below for what this API returns in common cases.

jQuery Examples

Example 1 — Status Message Updates

Register progress(), receive two notify() calls, then resolve().

jQuery
var dfd = $.Deferred();

dfd.progress(function (message) {
  console.log("Progress:", message);
});

dfd.done(function (result) {
  console.log("Done:", result);
});

dfd.notify("50% complete");
dfd.notify("90% complete");
dfd.resolve("Operation completed successfully");
Try It Yourself

How It Works

  1. Attach listeners. progress and done are registered while pending.
  2. First notify. The progress handler logs 50% complete.
  3. Second notify. Same handler runs again with 90% complete.

Example 2 — Percent Steps

Pass numbers through notify() to drive a simple percent log (or a UI bar).

jQuery
var dfd = $.Deferred();

dfd.progress(function (percent) {
  console.log("Upload:", percent + "%");
});

dfd.done(function () {
  console.log("Upload finished");
});

[25, 50, 75, 100].forEach(function (pct) {
  dfd.notify(pct);
});

dfd.resolve();
Try It Yourself

How It Works

  1. One handler. It expects a number from each notify.
  2. Loop. Four percentages each call notify(pct).
  3. Log each step. The handler prints Upload: N%.

Example 3 — Multiple Progress Handlers

Every notify() calls each registered progress callback.

jQuery
var dfd = $.Deferred();

dfd.progress(function (step) {
  console.log("A:", step);
});

dfd.progress(function (step) {
  console.log("B:", step);
});

dfd.notify("loading");
dfd.resolve("ok");
Try It Yourself

How It Works

  1. Register two handlers. Both sit in the progress queue.
  2. One notify. jQuery invokes A, then B, with "loading".
  3. Same args. Each handler receives the notify arguments.

Frequently Asked Questions

progress() adds handlers that run when the Deferred generates progress notifications via notify() or notifyWith(). It does not settle the Deferred — resolve() and reject() still control the final outcome.
done() runs once on successful resolve. progress() can run many times while the Deferred is pending. Use progress for interim updates; use done for the finish.
notify() and notifyWith() on the same Deferred. Each call invokes every registered progress callback with the arguments you passed.
Yes. progress() accepts a function or an array of functions, and you may pass multiple arguments (each a function or array).
New notify() calls no longer fire progress handlers after settlement. But a progress callback added after resolve/reject runs immediately with the arguments from the last notify()/notifyWith().
No. Progress notifications are a jQuery Deferred feature. Native Promises only fulfill or reject — use separate callbacks, events, or other patterns for mid-flight updates.

Next: deferred.notify() Method

Learn how to share a read-only promise so callers can listen but not settle.

deferred.notify() Method tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

9 people found this page helpful