jQuery Deferred isResolved() Method

Beginner
⏱️ 9 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
State check

What You’ll Learn

The isResolved() method returns true when a jQuery Deferred has completed successfully — and false while it is still pending or after a failure. This tutorial covers syntax, return values, five examples, comparisons with state(), and when not to poll this method.

01

Syntax

dfd.isResolved()

02

true

Resolved state

03

false

Pending / rejected

04

state()

Modern jQuery 3+

05

vs done()

Check vs callback

06

Timing

After settle

Introduction

Callbacks like done() react when a Deferred succeeds. Sometimes you need a quick synchronous answer: has this task already completed successfully? isResolved() answers that question with a boolean — no callback registration required.

Use it for conditional debugging, branching in test helpers, or inspecting Deferred state at a known checkpoint. For production success handling, prefer done() or then() — they fire automatically when resolution happens, without polling.

Understanding the isResolved() Method

isResolved() is a state query on jQuery’s Deferred object. It returns true only when the Deferred has entered the resolved state via resolve(), a successful AJAX call, or a fulfilled promise in a chain.

It returns false when the Deferred is still pending (work not finished) or rejected (failure). A Deferred can only settle once — it never flips from resolved back to rejected.

💡
Beginner Tip

Do not call isResolved() immediately after starting async work — the original reference example checked right after setTimeout was scheduled, which always returned false. Check inside done() or after resolve() runs.

📝 Syntax

General form of deferred.isResolved:

jQuery
deferred.isResolved()

Return value

  • true — the Deferred has been resolved successfully.
  • false — the Deferred is still pending or was rejected.

Modern alternative (jQuery 3+)

jQuery
if (dfd.state() === "resolved") {
  console.log("The operation succeeded");
}

⚡ Quick Reference

Deferred stateisResolved()state()
Pendingfalse"pending"
Resolvedtrue"resolved"
Rejectedfalse"rejected"

📋 isResolved() vs done() vs state()

Three ways to interact with success — choose based on whether you need a callback or a snapshot.

isResolved()
boolean

Sync state snapshot

done()
callback

Runs on resolve

state()
"resolved"

jQuery 3+ preferred

Timing
after settle

Not while pending

Examples Gallery

Each example shows when isResolved() returns true or false. Use the Try-it links to run them interactively.

📚 Getting Started

See isResolved() return true only after a successful resolve.

Example 1 — After resolve()

Resolve the Deferred, then check isResolved().

jQuery
const dfd = $.Deferred();

dfd.resolve("Data loaded");

console.log(dfd.isResolved());  // true
console.log(dfd.state());       // "resolved"
Try It Yourself

How It Works

Once resolve() runs, the state locks to resolved. Every subsequent isResolved() call returns true.

Example 2 — While Still Pending

Before resolve() or reject(), the Deferred is not resolved.

jQuery
const dfd = $.Deferred();

console.log(dfd.isResolved());  // false
console.log(dfd.state());       // "pending"
Try It Yourself

How It Works

Pending means the async operation has not settled yet. isResolved() is false — success has not been recorded (and failure may still happen).

Example 3 — After Rejection

A rejected Deferred is not resolved — success and failure are mutually exclusive.

jQuery
const dfd = $.Deferred();

dfd.reject("Server error");

console.log(dfd.isResolved());  // false
console.log(dfd.isRejected());  // true
console.log(dfd.state());       // "rejected"
Try It Yourself

How It Works

After reject, isResolved() stays false forever for that Deferred. Use isRejected() or state() === "rejected" to detect failure.

📈 Practical Patterns

Correct timing with async work and modern state() checks.

Example 4 — Delayed Resolve (Check Inside done())

When work finishes later, inspect state in the success callback — not before the timer fires.

jQuery
const dfd = $.Deferred();

console.log("before timeout:", dfd.isResolved());  // false

setTimeout(function () {
  dfd.resolve("Finished!");
}, 800);

dfd.done(function (value) {
  console.log("in done():", dfd.isResolved());  // true
  console.log("value:", value);
  console.log("state():", dfd.state());         // "resolved"
});
Try It Yourself

How It Works

This fixes the timing bug in the original reference example, which called isResolved() synchronously while the timeout was still pending.

Example 5 — Compare with state() === "resolved"

In jQuery 3+, state() is the preferred way to read resolution status.

jQuery
function logStatus(dfd) {
  console.log("state():", dfd.state());
  console.log("isResolved():", dfd.isResolved());
  console.log('state === "resolved":', dfd.state() === "resolved");
}

const ok = $.Deferred().resolve("done");
logStatus(ok);

const failed = $.Deferred().reject("error");
logStatus(failed);
Try It Yourself

How It Works

isResolved() and state() === "resolved" agree on resolved Deferreds. Use state() when you also need to distinguish pending from rejected.

🚀 Use Cases

  • Success state detection — confirm a Deferred succeeded before running follow-up logic.
  • Conditional branching — choose different code paths in tests or debug utilities based on resolution.
  • Dynamic UI updates — show content panels when state() is "resolved" after async UI loads.
  • Logging — record resolution status alongside other Deferred metadata during diagnostics.
  • Multi-task coordination — inspect individual Deferreds returned from $.when() after a batch completes.

🧠 When isResolved() Returns What

1

Pending

Work in progress — isResolved() is false.

Wait
2

Settled

Deferred resolves or rejects — state locks permanently.

Final
3

Query

isResolved() returns true only for the resolved branch.

Check
=

Informed action

Combine with done() for reactions and state() for readable status in jQuery 3+.

📝 Notes

  • isResolved() is deprecated in jQuery 3.0+ — use state() === "resolved" in new code.
  • Never assume false means failure — it can also mean still pending.
  • Prefer done() over polling isResolved() in production success handling.
  • isResolved() and isRejected() are never both true on the same Deferred.
  • For jqXHR from $.ajax(), the same state rules apply once the request completes.

Browser Support

deferred.isResolved() has been available since jQuery 1.5. It remains supported in jQuery 3.x but is deprecated — prefer state().

jQuery 1.5+

jQuery Deferred.isResolved()

Works in jQuery 1.5+, 2.x, and 3.x wherever Deferred objects run. Deprecated since jQuery 3.0 in favor of state().

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.isResolved() Universal

Bottom line: Safe in legacy jQuery codebases. For new jQuery 3+ projects, write dfd.state() === "resolved" instead.

🎉 Conclusion

The deferred.isResolved() method tells you whether a Deferred has completed successfully. Use it for synchronous state checks at the right moment — after resolution or inside done() — and prefer state() in modern jQuery code.

Next, explore notify() for progress updates on long-running tasks, or review state() for a single API that covers all three statuses.

💡 Best Practices

✅ Do

  • Check after resolve() or inside done()
  • Use state() in jQuery 3+ projects
  • Pair state checks with proper success callbacks
  • Test pending, resolved, and rejected paths
  • Log state during debugging sessions

❌ Don’t

  • Poll isResolved() in a busy loop
  • Check immediately after starting async work
  • Assume false means failure
  • Rely on isResolved alone for user-facing success UI
  • Ignore deprecation — migrate to state()

Key Takeaways

Knowledge Unlocked

Five things to remember about isResolved()

How to read success state on a Deferred.

5
Core concepts
T 02

true

Resolved

Success
F 03

false

Pending / fail

Other
04

Timing

After settle

Critical
state 05

Modern

Prefer state()

jQ 3+

❓ Frequently Asked Questions

isResolved() returns true when the Deferred has been resolved successfully. It returns false while the Deferred is still pending or after it has been rejected.
Only after the Deferred may have settled — inside a done() callback, after resolve(), or when you know async work finished. Calling it immediately while a timer or AJAX request is still pending always returns false.
In jQuery 3.0+, isResolved() and isRejected() are deprecated in favor of state(), which returns "pending", "resolved", or "rejected". Both still work; prefer dfd.state() === "resolved" in new code.
done() registers a callback that runs when the Deferred resolves. isResolved() is a synchronous boolean check of current state — it does not register a listener.
No. Once resolved or rejected, the state is locked. isResolved() is true only for the resolved state; isRejected() is true only for the rejected state.
Usually no. Prefer done(), then(), or always() callbacks. Polling isResolved() in a tight loop wastes CPU; use callbacks or state() checks at known checkpoints instead.
Did you know?

Before jQuery 1.7, developers often chained multiple done() handlers just to know when work finished. isResolved() (added in 1.5) and state() (1.7) made synchronous status checks possible — though callbacks remain the right tool for reacting to completion.

Continue to notify()

Learn how to send progress updates on long-running Deferred tasks.

notify() 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