An easy way to display network strength. Pingr inserts a box (the size of your choosing) into the page this displays the user's current network speed. You can also use it to see when a user's internet connection disconnect/reconnects.
- Create a div with an id of "pingr" and put it where you want the Pingr box to appear:
<div>id="pingr"</div>
- Insert this script at the end of the body:
<script src="www.mattheakis.com/pingr/pingr.js"></script>
- Call this function with desired width/height of the Pingr box
Pingr.init(width, height)
Pingr.disconnectListener(function() {
console.log("this is executed when the user's internet disconnects!");
});
Pingr.reconnectListener(function() {
console.log("this is executed when the user's internet reconnects!");
});