javascript - How can I make a redirect page by browser using jQuery? -


is possible redirect user use specific browser different link, using jquery (or javascript)?

i tried doesn't work:

<script type="text/javascript">     if ((navigator.useragent.indexof('firefox') != -1)     {         document.location = "http://other/page.com/";     } </script> 

you doing ok, have syntax error - 1 left brace, remove 1 before navigator:

if (navigator.useragent.indexof('firefox') != -1)     {         document.location = "http://other/page.com/";     } 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -