Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. var imgCheck = new Image();
  2. imgCheck.onerror = function(){ console.log('offline');};
  3. imgCheck.onload = function(){ console.log('online');};
  4. imgCheck.src = <URL_OF_IMAGE> + '?' +new Date().getTime();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement