[英]Chrome developer tool does Not capture a form submit in network tab, Why?
a simple html page,一个简单的html页面,
<body>
<form method="POST" action="abc">
<input ... />
</form>
</body>
submit the form with javascript用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.请求确实已提交(服务器返回文件作为下载),但我在网络选项卡中找不到任何活动。
any idea?任何的想法? thanks in advance.
提前致谢。
Update: Firefox is working well on capturing this.更新: Firefox 在捕捉这个方面做得很好。
From https://stackoverflow.com/a/55197547/3774338来自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.如果它触发下载文件的事件,Chrome 将创建一个新选项卡,该选项卡将立即关闭,因此您无法在开发工具中捕获此请求。
Solution: check 'Offline' checkbox at the network tab, which will fail to send the request, so the tab will not be closed.解决方法:勾选网络选项卡中的“离线”复选框,将无法发送请求,因此选项卡不会关闭。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.