Forum Moderators: open

Message Too Old, No Replies

Web page settings for Windows or MAC

         

techoveride

9:26 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



I would like to find out if there is a way to direct people who use Windows to one page and people who use a MAC to another page. It doesn't matter what browser they are using, I am trying to just send MAC users to the correct page on my site.

tedster

11:06 pm on Jul 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can do this with Javascript - normally the browser identification includes the operating system.

However, there are other operating systems than just those two, and also the possibility that a script may not detect the OS for various reasons. So I would suggest serving the "Windows" page by default, and then running a OS detection and redirect script in the <head> of your html document to send Macintosh users to a different page.

I'd also suggest using the location.replace() method so the Back Button stays intuitive for your mac visitors. Here's one way to do it:

<script type="text/javascript">
if (navigator.appVersion.indexOf("Mac")!=-1)
location.replace("mac-page.html");
}
</script>