Chrome developer tool does Not capture a form submit in network tab, Why?

Viewed 3200

a simple html page,

<body>
    <form method="POST" action="abc">
        <input ... />
    </form>
</body>

submit the form with javascript

document.getElementsByTagName('form')[0].submit()

The request was indeed submitted (the server return a file as download), but I could not find any activity in network tab.

enter image description here

any idea? thanks in advance.

Update: Firefox is working well on capturing this. enter image description here

1 Answers

From https://stackoverflow.com/a/55197547/3774338

If it triggers an event to download a file, Chrome will create a new tab and this tab will be closed immediately so that you cannot capture this request in Dev Tools.

Solution: check 'Offline' checkbox at the network tab, which will fail to send the request, so the tab will not be closed.

Related