我需要在任何事件(如按钮单击或使用时间间隔)上使用 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 请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Electron 渲染器进程中创建子窗口时如何修复How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器进程中创建子窗口
mainWindow.loadURL("https://localhost:3000/") 在 EmainWindow.loadURL(quot;https://localhost:3000/quot;) show white screen on Electron app(mainWindow.loadURL(https://localhost:3000/) 在 Electron 应用程
Electron webContents executeJavaScript:无法在第二个 loaElectron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:无法在第二个 loadURL 上
如何在angular-cli的组件内使用电子浏览器窗口?how to use electron browser window inside components in angular-cli?(如何在angular-cli的组件内使用电子浏览器窗口?)
ElectronJS - 在 Windows 之间共享 redux 存储?ElectronJS - sharing redux store between windows?(ElectronJS - 在 Windows 之间共享 redux 存储?)
如何在电子应用程序中访问相机/网络摄像头?How to access camera/webcamera inside electron app?(如何在电子应用程序中访问相机/网络摄像头?)