View Full Version : online - offline check
wouter
01-18-2003, 01:45 PM
Is there a possibility to check is the browser is working offline or online? - only a client-side solution is possible.
Tx
Borgtex
01-18-2003, 04:21 PM
use navigator.onLine, that returns true/false
jalarie
01-20-2003, 03:57 PM
But "navigator.onLine" doesn't work in Netscape. I use an image tag to check; you might be able to do something with this:
<script type="text/javascript">
Now=new Date();
Out ='<img src="http://my.com_gren.gif';
Out+='?'+Now*1;
onerror="this.src=\'_red.gif\'"/>\n';
document.write(Out);
</script>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.