logo

Ping

Ping connection testing started

Ping.js is a small and simple Javascript library for the browser to "ping" response times to web servers in Javascript! This is useful for when you want to display realtime ping times on a status page which are relative to the user.
See Notes below for how this works.
JS Fiddle Example: http://jsfiddle.net/alfg/sr0tpn4x/
Example in jQuery: http://jsfiddle.net/alfg/xjqbvt2o/


Starter projects

This module is for the browser only as it depends on the brower's Image API.

Guides

Creates a ping request to the source. Returns a promise that resolves and rejects to the response time in milliseconds, or if the browser does not supports Promise, returns undefined.