How to properly redirect browsers?


hi everyone,

 

i not developer, trying figure out how redirect browsers going website.  i've set separate html doc javascript code in head tag:

 

 

<script language="javascript"

type="text/javascript">

if(navigator.appname == "webtv")

{

window.location = "http://s364852370.onlinehome.us/harmonicmotion/harmonicmotionii/browser.html"

}

if(navigator.appname == "google chrome")

{

window.location.href = "http://s364852370.onlinehome.us/harmonicmotion/harmonicmotionii/harmonicmotionii.html"

}

if(navigator.appname == "netscape")

{

window.location = "http://s364852370.onlinehome.us/harmonicmotion/harmonicmotionii/browser.html"

}

if(navigator.appname == "microsoft internet explorer")

{

window.location = "http://s364852370.onlinehome.us/harmonicmotion/harmonicmotionii/browser.html"

}

window.location == "http://s364852370.onlinehome.us/harmonicmotion/harmonicmotionii/harmonicmotionii.html"

</script>

 

the thing is, seems work on browsers, google chrome not being directed place specify.  rather redirects same page out of date browsers.  javascript not compatible chrome?  , if there other way this?  heard javascript testy redirects, couldn't find better way online.  let me know if doing drastically wrong.

 

thanks,

 

hm

javascript browser sniffing dated, , not wholly reliable, approach generates lot of work web designer.

 

it has largely been replaced responsive web design , progressive enhancement techniques.

 

http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/

 

https://www.google.com.au/search?q=responsive+web+design



More discussions in Dreamweaver support forum


adobe

Comments