Disabling the browser tab (checking what happens when the user connection is disconnected)

I am looking for a way to force a disconnect (a way to disable) a browser tab.

What I'm trying to do is check my site, where I open a website on a server from a browser and then emulate a disconnect, but only on this tab of the browser (or even in the browser), because I need my connection to check what happens on the server at that exact moment.

I was looking for a chrome extension for this, but I could not find it. But any way to achieve this would be good.

My client OS is MacOSX 10.5

+4
source share
2 answers

You can just kill the browser process. In this case, the browser will not be able to close the connection gracefully. It will look pretty much like a disconnected network connection to the server.

See this question at superuser.com on how to kill a process on MacOS.

An even more realistic test would be to create a virtual machine, start the client there (or server), and then terminate the virtual network connection.

Another option is to configure a local proxy server (note that several proxy servers already support WebSockets), connect to the server through this proxy server, and then simulate an interrupted connection by killing the proxy server. In this way, you could watch the servers and clients react to the event.

0
source

In Chrome, use Menu | Tools | Task Manager Menu | Tools | Task Manager Menu | Tools | Task Manager to view a list of tabs. From there, you can kill the tab in the middle of the page load.

0
source

All Articles