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?