Google Developer Tools "Network" Tab clears after redirect
Asked Answered
U

2

177

Google Developer Tools "Network" Tab clears after redirect to another page and i want to know if there is any way to keep all request?

I want to do this because i want to verify one POST request but it redirects and get cleared.

In firebug we can use the "Persist" option:

(The "Persist" option prevents clearing the console at a page reload. That means, the messages will stay inside the console as long as this option is enabled.) https://getfirebug.com/wiki/index.php/Console_Panel

Unification answered 22/5, 2012 at 14:18 Comment(1)
Possible duplicate of How to use chrome's network debugger with redirectsBr
S
300

In the network tab of dev tools, on the top left of the dev tools there should be a checkbox labelled Preserve log. Click that and it will preserve network upon navigation.

Chrome screenshot

(older versions may have the record button in the buttom left, as seen here)

Serpentiform answered 22/5, 2012 at 14:25 Comment(2)
"Preserve log" in Chrome 72.xxx doesn't prevent replacement of POST requests after the server sends a redirect. This is very disappointing given this is a developer tool... :-( Apparently, the issue is manifesting itself when you are filtering requests by "Doc". This filter is quite useful for filtering out all the noise from resource requests. In any case, when filtering by "Doc" (or some other filter), the original (pre-direction) POST requests are still recorded, but kept under the "Other" filter!Pillbox
Specifics that might help someone: Post request responses are shown as "Failed to load response data" if I happen to location.reload prior to viewing them. If I set a breakpoint after the response's arrival but before the location.reload, and view the response while execution is paused, and then resume execution, the response renders correctly on subsequent viewings. Chrome 80.0.3987.132 and FF 74.0 both exhibit this.Banwell
H
2

Press F8 a couple times until "Paused in debugger" displays. This pauses all JavaScript execution before the reload event. Press F8 again to resume.

The "preserve log" feature mentioned in an answer above is helpful, but each time the page changes (refresh, etc.), the contents of some of the network data tabs are blanked and "Failed to load response data" is displayed. Stopping Javascript execution at the right spot can let you peek at this data before it is erased.

Heterochromous answered 9/6, 2022 at 19:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.