如何使用 jquery 从网络选项卡中清除 ajax 请求? [英] How to clear ajax requests from network tab using jquery?

查看:11
本文介绍了如何使用 jquery 从网络选项卡中清除 ajax 请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在任何事件(如按钮单击或使用时间间隔)上使用 jquery 清除网络选项卡中的 ajax 请求.这可能吗?

I need to clear the ajax requests from network tab using jquery on any event like button click or using time interval. Is this possible?

推荐答案

如果你的意思是浏览器开发工具中的网络选项卡,那么不,你无法通过 Javascript 控制它.开发工具是浏览器的一部分,而不是网页的一部分,因此 Javascript 对它们一无所知.

If you mean the network tab in the browser's dev tools, then no, you cannot control it from Javascript. The dev tools are part of the browser and not part of the webpage, so Javascript has no knowledge of them.

这与您的问题没有直接关系,但这证明您想要做的事情是非常不可能的:

This isn't directly related to your question, but this is evidence that the kind of thing you're looking to do would be very much not possible:

我们只允许显式打开开发工具.

We only allow explicit devtools opening.

https://bugs.chromium.org/p/chromium/问题/详细信息?id=112277

这篇关于如何使用 jquery 从网络选项卡中清除 ajax 请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆