Is there any way to disable web socket connections or end a web socket connection through Chrome's developer tools network tab?
I've noticed that turning throttling under the network tab to Offline doesn't affect web socket connections that have already been established. It only prevents traditional HTTP requests from going out.
There's a question here related to this, but it's woefully outdated.
disable the feature "Intensive throttling of Javascript timer wake ups" in Chrome or, 2. change the web-transport inactive-timeout in the client profile to more than 60 seconds. To disable the Chrome feature, key in "chrome://flags" in Chrome URL field, search for "Throttle Javascript timer" and disable the feature.
When you want to turn off WebSockets, click on the TamperMonkey icon and the toggle switch to enable blocking. Refresh the page. Disable the script when you no longer want to block WebSockets.
If you are writing a server, you should make sure to send a close frame when the server closes a client connection. The normal TCP socket close method can sometimes be slow and cause applications to think the connection is still open even when it's not.
Launch Chrome Developer tools. Load your page and initiate the WebSocket connections. Click the Network Tab. Select the WebSocket connection from the list on the left (it will have status of "101 Switching Protocols".
As of Chrome 99 this is supported: https://developer.chrome.com/blog/new-in-devtools-99/#websocket
No, there is no way to disable or close a connection from the Network panel. Source: DevTools Engineer.
If you have a reference to the WS connection, though, you can close it via the Console using its JS API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With