Snippet details
ID: 68
Viewed: 1459
Added: 2002-01-29
Version:
Many of us would like to have Scripts or html pages which could be run OFFLINE on the clients PC when they are NOT connected to the internet. This is an example of how to check using some very SIMPLE HTML and JavaScript. Example you may have Gifs which you could reference in a default home page which could now be accessed offline via a directory on the clients system. Very Many possibilites with this.
General Details
Snippet uploaded by: snippet
Email : webmaster@snippetlibrary.com
Snippet By: Don Kennedy
<!---Head--->
<html xmlns:MSIE="urn:default" id="htmlText" style="width: 365px; height: 240px">
<HEAD>
<STYLE>
MSIE:CLIENTCAPS {behavior:url(#default#clientcaps)}
</STYLE>
</HEAD>
<!---Body--->
<body tabindex="-1">
<MSIE:CLIENTCAPS ID="idClCap" />
<script language="JavaScript">
var str = document.all.idClCap.connectionType;
alert (str);
if (str == "lan")
downloadSpeed = 800; // good estimate for LAN - 800 KB/min
else if (str == "offline")
{
downloadSpeed = 100; // default to modem speed if offline
isoffline = true;
alert (document.all.idClCap.connectionType);
}
else
downloadSpeed = 120; // good estimate for 28.8kbps modem, 120 KB/min
alert (downloadSpeed);
</SCRIPT>
</BODY>
</HTML>
No Reviews to show
