jQuery Deferred notify() Method

Beginner
⏱️ 10 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Progress updates

What You’ll Learn

The notify() method sends progress updates while a jQuery Deferred is still pending. Handlers registered with progress() receive each update — perfect for progress bars, step labels, and status messages before you call resolve() or reject().

01

Syntax

dfd.notify(args)

02

progress()

Receives updates

03

Pending

State unchanged

04

Multiple

Call many times

05

vs resolve

Interim vs final

06

Since 1.7

Deferred progress

Introduction

Not every async task finishes instantly. File uploads, data imports, and multi-step wizards need to tell users something is happening before the final result arrives. jQuery’s notify() method fills that gap — it fires progress() callbacks with status data while the Deferred remains in the pending state.

Think of notify() as a progress ping and resolve() as the finish line. You can ping many times along the way, then resolve when the work truly succeeds (or reject if it fails).

Understanding the notify() Method

notify() is part of jQuery’s Deferred Object API (since jQuery 1.7). Calling deferred.notify(value) invokes every handler attached with progress(), passing along optional arguments — strings, numbers, objects, or multiple values.

Unlike resolve() and reject(), notify() does not settle the Deferred. The state stays pending until you explicitly call resolve() or reject(). After settlement, additional notify() calls are ignored.

💡
Beginner Tip

Always register progress() before the first notify() call — just like attaching done() before resolve(). The original reference example never called resolve(), so done() never ran; our examples complete the full progress-then-success flow.

📝 Syntax

General form of deferred.notify:

jQuery
deferred.notify( [ args ] )

Parameters

  • args — optional values forwarded to every progress() callback (message string, percent number, status object, etc.).

Return value

  • Returns the same Deferred object for chaining further notify(), resolve(), or reject() calls.

Minimal progress flow

jQuery
const dfd = $.Deferred();

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

dfd.done(function () {
  console.log("Finished!");
});

dfd.notify("Processing...");
dfd.resolve();

⚡ Quick Reference

GoalCode
Send progress updatedfd.notify(value)
Listen for progressdfd.progress(fn)
Finish successfullydfd.resolve(result)
Finish with errordfd.reject(reason)
Progress with custom thisdfd.notifyWith(ctx, args)

📋 notify() vs resolve() vs progress()

Three related methods — each plays a different role in async workflows.

notify()
interim ping

Fires progress handlers

progress()
register fn

Listen for notify()

resolve()
final success

Triggers done()

State
pending

Until resolve/reject

Examples Gallery

Each example demonstrates progress reporting with notify(). Use the Try-it links to run them interactively.

📚 Getting Started

Send a progress message, then resolve when work completes.

Example 1 — Basic Progress Message

Register progress(), call notify(), then resolve().

jQuery
const dfd = $.Deferred();

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

dfd.done(function () {
  console.log("Operation completed successfully!");
});

dfd.notify("Processing...");
dfd.resolve();
Try It Yourself

How It Works

notify() runs progress handlers immediately. resolve() settles the Deferred and triggers done() — completing the full async lifecycle.

Example 2 — Stepped Percentage Updates

Call notify() multiple times to simulate incremental progress.

jQuery
const dfd = $.Deferred();
const steps = [25, 50, 75, 100];

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

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

steps.forEach(function (pct) {
  dfd.notify(pct);
});

dfd.resolve({ file: "report.pdf" });
Try It Yourself

How It Works

Each notify(pct) fires all progress handlers. Pair this pattern with a progress bar width: bar.style.width = percent + "%".

📈 Practical Patterns

Multiple listeners, rich payloads, and timed async simulation.

Example 3 — Multiple progress() Handlers

Split progress work — logging, UI updates, and analytics — across focused callbacks.

jQuery
const dfd = $.Deferred();

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

dfd.progress(function (step) {
  $("#status").text("Step " + step + " of 3");
});

dfd.notify(1);
dfd.notify(2);
dfd.notify(3);
dfd.resolve("All steps done");
Try It Yourself

How It Works

Every progress() handler runs on each notify() — same queuing behavior as multiple done() handlers on resolve.

Example 4 — Multiple Notify Arguments

Pass several values to describe step number and label together.

jQuery
const dfd = $.Deferred();

dfd.progress(function (step, label, total) {
  console.log("Step " + step + "/" + total + ":", label);
});

dfd.notify(1, "Validate input", 3);
dfd.notify(2, "Process records", 3);
dfd.notify(3, "Save results", 3);
dfd.resolve();
Try It Yourself

How It Works

Arguments after the first are forwarded positionally — useful for wizard steps, batch indexes, or file counts without wrapping everything in an object.

Example 5 — Timed Async Workflow

Simulate a long operation with delayed notify() calls, then resolve — the pattern the reference example was missing.

jQuery
const dfd = $.Deferred();

dfd.progress(function (msg) {
  console.log(msg);
});

dfd.done(function () {
  console.log("Operation completed successfully!");
});

setTimeout(function () {
  dfd.notify("Loading data...");
}, 400);

setTimeout(function () {
  dfd.notify("Processing...");
  dfd.resolve();
}, 1200);
Try It Yourself

How It Works

Register handlers first, then emit progress as async milestones arrive. Always finish with resolve() or reject() so done() and fail() run.

🚀 Use Cases

  • File uploads — report bytes sent or percentage complete before the server confirms success.
  • AJAX batch jobs — notify after each chunk loads while the overall request stays pending.
  • Multi-step wizards — mark individual steps complete without resolving the whole flow.
  • Long computations — share iteration counts or estimated time remaining during heavy client-side work.
  • Progress bars and spinners — drive UI feedback from progress() while keeping final rendering in done().

🧠 How notify() Fits the Deferred Lifecycle

1

Register

dfd.progress(fn) queues handlers while state is pending.

Listen
2

Notify

notify(args) fires progress callbacks — state stays pending.

Update
3

Settle

resolve() or reject() locks the final outcome.

Finish
=

Informed user

Progress during work, final result via done() or fail().

📝 Notes

  • notify() does not trigger done() or fail() — only progress() handlers.
  • Call notify() only while the Deferred is pending; ignored after resolve/reject.
  • Consumers reading a promise() view cannot call notify() — only the Deferred owner should emit progress.
  • For custom this context in progress handlers, use notifyWith() (covered in the next tutorial).
  • Native Promises have no progress API — this pattern is specific to jQuery Deferred.

Browser Support

deferred.notify() has been available since jQuery 1.7 alongside progress(). It works wherever jQuery Deferred runs.

jQuery 1.7+

jQuery Deferred.notify()

Supported in jQuery 1.7+, 2.x, and 3.x. Progress notifications are a jQuery-specific extension — not part of the native Promise standard.

100% With jQuery loaded
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
deferred.notify() Universal

Bottom line: Safe in jQuery projects that implement custom long-running Deferred workflows. For greenfield apps, weigh whether jQuery progress is needed vs modern alternatives.

🎉 Conclusion

The deferred.notify() method keeps users informed during async work. Pair it with progress() for interim updates, then resolve() or reject() for the final outcome.

Practice the five examples above, then continue to notifyWith() when you need to control the this context inside progress handlers.

💡 Best Practices

✅ Do

  • Register progress() before the first notify()
  • Always finish with resolve() or reject()
  • Send meaningful, user-friendly progress messages
  • Combine with progress bars or step indicators in the UI
  • Keep progress payloads small and consistent

❌ Don’t

  • Confuse notify() with resolve()
  • Call notify() after the Deferred settled
  • Spam hundreds of updates per second — throttle if needed
  • Put final success logic only in progress()
  • Expose notify() on public promise objects

Key Takeaways

Knowledge Unlocked

Five things to remember about notify()

How to report progress on jQuery Deferreds.

5
Core concepts
📢 02

progress()

Receives pings

Handler
03

Pending

Not final

State
📈 04

Repeat

Many calls OK

Progress
05

Then resolve

Complete flow

Finish

❓ Frequently Asked Questions

notify() sends interim progress updates to handlers registered with progress(). The Deferred stays pending until you call resolve() or reject(). Use notify() for status messages, percentages, or step counts during long-running work.
resolve() finishes the Deferred successfully and triggers done() handlers. notify() only fires progress() callbacks and does not change the final state — you still need resolve() or reject() when the work actually completes.
Register handlers with deferred.progress(callback). Each notify() call invokes every progress callback with the arguments you pass to notify().
Yes. Unlike resolve() and reject(), notify() can be called many times while the Deferred is still pending — ideal for streaming progress like 25%, 50%, 75%.
No. Once a Deferred settles, further notify() calls are ignored. Send all progress updates before calling resolve() or reject().
No. Progress notifications are a jQuery Deferred feature. Native Promises only support fulfillment and rejection. For new code without jQuery, consider callbacks, events, or Observable patterns for progress.
Did you know?

jQuery added progress support in version 1.7 to mirror long-running operations like file uploads. The W3C Promise standard intentionally omitted progress — jQuery’s notify() / progress() pair remains one of the few built-in progress patterns in mainstream JS libraries.

Continue to notifyWith()

Learn how to control the this value inside progress callbacks.

notifyWith() tutorial →

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.

6 people found this page helpful