|
|
Subject:
Apple Safari BrowserDetect and Alert Message
Category: Computers > Programming Asked by: binarian-ga List Price: $2.00 |
Posted:
06 Dec 2003 12:32 PST
Expires: 05 Jan 2004 12:32 PST Question ID: 284194 |
i need something that will simply detect that a browser is Apples Safari browser and if so it will redirect to another page. |
|
Subject:
Re: Apple Safari BrowserDetect and Alert Message
Answered By: juggler-ga on 06 Dec 2003 13:13 PST Rated: |
Hello. Here's an idea: var isSafari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1; if(isSafari){location="safariPage.html"} source: newsgroup message, archived by Google Groups: http://groups.google.com/groups?q=%22detect+safari%22&hl=en&lr=&ie=UTF-8&selm=3E382BD6.CBD6DD61%40gerrytimlin.com&rnum=1 Here the page where the Safari use is redirected is called safariPage.html, but you can call it anything you want. I'm a Mac user, so I personally tested this by putting it into the head of an html file. For example: <head> <script language=JavaScript> var isSafari=navigator.userAgent.toLowerCase().indexOf("safari")!=-1; if(isSafari){location="safariPage.html"} </script> </head> I then tested it with Safari and other browsers. When viewed with Safari, it did indeed redirect to me to the other page. -------- search strategy: google groups: "detect safari" I hope this helps. | |
|
binarian-ga rated this answer: |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |