[thelist] Browser check

Vincent Birebent vincent.birebent at laposte.net
Fri Feb 2 05:48:37 CST 2001


At 10:21 02/02/2001 +0100, you wrote:
>Hi there.
>
>Im new to this list, but it's seems to be an ocean of knowlegde gathered
>here. Great!
>
>Does anyone know were i can find a good prewritten javascript, that chechs
>the visitors browser type/version AND which plattform (Windows/Mac) the
>visitor is on, and then redirects him to the proper page.
>
>Thanks!

you can use javascript properties :
navigator.appName and navigator.appVersion (and why not navigator.platfrom)

but there is a more common way :

checking browser capabilities, for example :

   var ie = (document.all) ? true : false;
   var ne = (document.layers) ? true : false;
   var ns6 = (document.getElementById) ? true : false; // for IE55, nS6 = true

Then use

if (ne) document.url=xx
else if (ie) document.url= yy
else if (ns6) document.url= zz // test ie before ns6 !






More information about the thelist mailing list