You really shouldn't open a connection to the server from the website at anytime.
If anything have it either updating a textfile and if the file wasn't modified within a specific timespan eg. 15 seconds then the server is offline.
Or do the same princip but using a database ex. MySQL, MSSQL etc.
It will leave connection overloads out for the server.
Quote:
Originally Posted by Y u k i
Also, you could do it with jscript async, so it wont block the loading of your site. Plus a timeout of lets say 200ms should be sufficient for a ping packet..
|
I know it probably wouldn't be a problem with a pserver, but let's say he has a traffic of 1000 people at on his website and it keeps pinging every 200 ms.
That would be 5000 connections done every second to the server and not even a legit logged in client.