Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capture Downloads in the Network Tab of Google Chrome Developer Tools

The Network tab in the Google Chrome Developer Tools window shows almost all http requests made, but does not seem to capture anything when the http request results in a file being downloaded.

How can I capture download requests in Google Chrome?

like image 372
Ari Seyhun Avatar asked Feb 22 '18 06:02

Ari Seyhun


People also ask

How do I capture a network tab?

Chrome/Edge Select Tools > Developer Tools. The Developer Tools window opens as a docked panel at the side or bottom of Chrome. Click the Network tab. Select Preserve log.

How do I use a network tab in Developer Tools?

Simply go to the page and open the network tab. You can see the network tab by hitting cmd + opt + j on your Mac or ctrl + shift + j in Windows. It will open up the console tab in DevTools by default. Once the console tab is open, simply click on the network tab to make it visible.

How do I find the network tab in Developer Tools?

Finding the Console/Network Tab in Google Chrome: Either click the three dots in the top right of your chrome browser to open the menu. Then, go to 'More tools > Developer Tools' and then switch to the Console Tab. Or, Press Ctrl+Shift+J (Windows / Linux) or Cmd+Opt+J (Mac).


1 Answers

I am sure that your file download is happening by opening a new window. Network tab of developer tools only captures the request of current tab.

For example, following link will download the file but it will not appear in the network tab.

<a href="/yourfile.doc" target="_blank">Click Here to Download file</a> 

Similar type of things can be done using javascript using (window.open, dynamic hyperlink/iframe), which will not appear in the network tab.

Various Javascript approach you can check here

I have observed similar behaviour in my past.

You cane check the chrome://net-internals in older version of chrome and chrome://net-export/ in the newer version of chrome to monitor any type of request being made by any instance/tab of chrome.

Note: You can check the internal events of chrome by typing chrome://net-export/ in the url box of chrome.

like image 159
PSK Avatar answered Sep 20 '22 15:09

PSK