interceptor icon indicating copy to clipboard operation
interceptor copied to clipboard

Responses are not intercepted on page reload

Open churixho opened this issue 6 years ago • 6 comments

My SPA site is built using ReactJS + Redux + react router. Let's say we have page A whichs load a.json and page B which loads b.json

Case 1: Go to page A; intercept a.json; then refresh the page Results: a.json is not intercepted

Case 2: Go to page A; intercept b.json; then go to page B Results: b.json is intercepted successfully

Expected behaviour: Response could be intercepted upon page refresh

churixho avatar Aug 30 '18 07:08 churixho

@churixho Chrome/Firefox?

revathskumar avatar Aug 30 '18 07:08 revathskumar

Problem occured in both Firefox and Chrome

churixho avatar Aug 30 '18 08:08 churixho

It appears to me that the this is due to race condition. When I delay the axios in my site (i.e. the loading of a.json in the example) for 2 seconds, the result could be interruped.

churixho avatar Aug 30 '18 09:08 churixho

@churixho Yes, the issue here is that the the web page gets the data from axios before Interceptor can inject a script. We are working towards a fix for this.

amitmbee avatar Aug 31 '18 07:08 amitmbee

I'm also waiting for the capability to intercept response on page reload.

therisingindian avatar Jan 08 '19 15:01 therisingindian

I'm using Interceptor to debug an angular page, and need to intercept XHR requests run during page load. I too notice that Interceptor can't intercept this when reload the page.

quinncomendant avatar Jan 09 '19 17:01 quinncomendant