I have:
www.mywebsite.com/index.html for Safari (my main browser type)
www.mywebsite.com/index2.html for MS Internet Explorer
www.mywebsite.com/index3.html for Mozilla/FireFox/Netscape
can anyone help me with a (current ver compat.) browser detect then redirect script for the corresponding pages? The weak ones I've found on the net are at least 3 or 4 years old on average and are worthless.
Will the follwoing work in my <head> how do I make it compatable with all versions? version=="all" will that work and will the script work at all itself?
thanks
<SCRIPT>
browser = navigator.appName
ver = navigator.appVersion
version = ver.substring(0,1)
if (browser=="Safari") {
if (version=="All")
document.location.href="www.mywebsite.com/index.html"
}
if (browser=="Internet Explorer") {
if (version=="All")
document.location.href="www.mywebsite.com/index3.html"
}
if (browser=="Netscape") {
if (version=="All")
document.location.href="www.mywebsite.com/index3.html"
}
if (browser=="Firefox") {
if (version=="All")
document.location.href="www.mywebsite.com/index2.html"
}
if (browser=="Mozilla") {
if (version=="All")
document.location.href="www.mywebsite.com/index2.html"
}
</SCRIPT>



Reply With Quote

Bookmarks