I am using the application running on a localhost:1234, In its javascript code I only want to execute a code if another localhost:9898 is up and running. How can i check that on javascript level? PS- I have tried window.location but it only works related to the same window, How can I achieve this?
Asked
Active
Viewed 159 times
0
-
Use `fetch` to get a response from the other server. – Poul Bak Nov 19 '21 at 08:01
-
2Does this answer your question? [Is it possible to ping a server from Javascript?](https://stackoverflow.com/questions/4282151/is-it-possible-to-ping-a-server-from-javascript) – Justinas Nov 19 '21 at 08:03