20100810

Using JavaScript to Ping

Using JavaScript to Ping

Have you ever wish to there was a way to ping another site using pure JavaScript? Well there is a way now by using JavaScript and an images. The method I'm going to share with you today isn't something new in fact most of us who're familiar with JavaScript may have come across this method in the past. However the a limitation to this method as we need to image URI as a ping destination for the test.
As usual I'm using a sort of Object notation to organize everything. The function is very much load and go approach so you don't need to scratch your head to understand any of this.
How do you use it? All you need to do is declare the image URI for the function to test and create a callback to ping.init().
Posted on 2007-07-08 23:00

No comments:

Post a Comment