Ticket #8327 (closed bug: wontfix)
jXHR.responseText is not available before complete()
| Reported by: | shikakaa@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | ajax | Version: | 1.5 |
| Keywords: | Cc: | jaubourg | |
| Blocking: | Blocked by: |
Description
Until 1.5.0 it was possible to access the native XHR object's responseText / responseXML property while the response was being loaded. Now this is not possible because these properties aren't set on the jXHR object before the request was completed.
I have looked at $.ajaxTransport() but I don't believe it can be used as a workaround.
Lame jsfiddle example showing how it powered a "show content as it's available from slow webservice" feature on my website: http://jsfiddle.net/5DT6B/
Change History
comment:1 Changed 2 years ago by jitter
- Cc jaubourg added
- Priority changed from undecided to low
- Component changed from unfiled to ajax
comment:2 Changed 2 years ago by jaubourg
- Status changed from new to closed
- Resolution set to wontfix
This kind of low-level activity can only be done on the native xhr (the architecture to handle that on the jqXHR object is definitely overkill). The prefilter in the jsfiddle above solves the problem.
As a side-note, showing content as it comes may seem nice but I wouldn't be surprised if it was actually broken in some browsers.
comment:3 Changed 2 years ago by shikakaa@…
Would you consider returning the native xhr on a method call or anything else that makes a workaround possible?
As it stands now, if I don't want to lose this nice feature for a growing % of users, I have to stick to jquery 1.4.4 or switch to using non-library js code for AJAX work.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
