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
Fundamentals
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.
Concept
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.
Foundation
📝 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");
}
Cheat Sheet
⚡ Quick Reference
Deferred state
isResolved()
state()
Pending
false
"pending"
Resolved
true
"resolved"
Rejected
false
"rejected"
Compare
📋 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
Hands-On
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.
isResolved() and state() === "resolved" agree on resolved Deferreds. Use state() when you also need to distinguish pending from rejected.
Applications
🚀 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+.
Important
📝 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.
Compatibility
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 ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
deferred.isResolved()Universal
Bottom line: Safe in legacy jQuery codebases. For new jQuery 3+ projects, write dfd.state() === "resolved" instead.
Wrap Up
🎉 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.
Rely on isResolved alone for user-facing success UI
Ignore deprecation — migrate to state()
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about isResolved()
How to read success state on a Deferred.
5
Core concepts
📝01
Returns
boolean
API
T02
true
Resolved
Success
F03
false
Pending / fail
Other
⏰04
Timing
After settle
Critical
state05
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.