New issue
Advanced search Search tips

Issue 636612 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 633696
Owner: ----
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Second of Nested XMLHttpRequests missing load and loadend events

Reported by jo...@freshrealm.co, Aug 10 2016

Issue description

Chrome Version       : Version 54.0.2825.0 canary (64-bit)
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK
    Firefox: 
         IE:

What steps will reproduce the problem?
(1) Have a URL that respons to a GET request and includes ETag support
(2) Execute a GET XMLHttpRequest
(3) In it's load event submit a second request to the same exact URL
(3) Verify that the second request's load event is never fired

What is the expected result?
I expect the second request's load and loadend events to fire.


What happens instead?
Only the loadstart event triggered on the second request


Please provide any additional information below. Attach a screenshot if
possible.
In investigating the issue (I noticed it in a production application), I created a simple node.js/AngularJS application to pinpoint the exact circumstances resulting in the behavior. I've uploaded that project here:
https://github.com/johngrogg/chrome-ajax-bug

The README file in the repository has instructions on how to run the functional testing.

 

Comment 1 by jo...@freshrealm.co, Aug 11 2016

Firefox also exhibits the expected behavior.
Components: Internals>Network
Components: -Internals>Network Blink>Network>XHR
Labels: OS-All
Status: Untriaged (was: Unconfirmed)
This is an issue with how we handle XMLHttpRequests and loading cached documents. We should probably be consistent with how we dispatch events for load, though I'm not sure whether cached documents should be firing all the same events as an actual fetched request, especially when we do re-validation.
Also for reference, it looks like the original request is getting cached in MemoryCache, and open is being called on the XHR, it just never updates to a different state (XHR Ready State Change) never happens on the second request. This also only shows up if the two requests are to the same cache-able URL, and if you insert another request between them, the issue doesn't show up.
Mergedinto: 633696
Status: Duplicate (was: Untriaged)
Thanks for reporting!

From
> (3) In it's load event submit a second request to the same exact URL
and Comment 4, this issue looks the same as  Issue 633696  (and thus a regression since M-52).

I expect XHR's events must be fired even when it is cached.

Sign in to add a comment