Click to See Complete Forum and Search --> : macs are evil


rhsunderground
12-11-2003, 01:56 PM
how do i prevent macs from opening my webpage? i know there's a way, but i have severe issues with writing javascript.

TheBearMay
12-11-2003, 02:23 PM
You could test the navigator.platform, not sure what MACs return, but it probably doesn't start with Win32...

fredmv
12-11-2003, 02:40 PM
Just because you don't like Macs it doesn't mean the people in which do like them shouldn't be able to access your content. How would you like it if, for example, one of the sites you liked hated the particular operating system or hardware that you were using and somehow prevented you from accessing it?

jaegernaut
12-11-2003, 02:54 PM
I knew there would be some Mac people that wouldn't like that verbage.

From what I've seen the navigator.platform usually returns "MacPPC" for Macs.

Pulling that and using some kind of redirect will send the user on to somewhere else.

If, however, you just don't want to make changes to the site so that it works well with Mac, and you aren't really looking to ban the user, then a more PC (Politically Correct not Personal Computer) way to handle it would be to either give them an alert saying something like "This site works best with a PC vs. a Mac" or some such message, or you could build a static page to redirect them to to say the same.

Then they could still get to your site if they wanted, and you will have covered any functional or display issues you may have with that platform.

I've seen the same used for older browser versions, such as Netscape 4.x versions.

I'm not a Mac fan either, but I don't want to turn away users either.

fredmv
12-11-2003, 02:57 PM
Originally posted by jaegernaut
I knew there would be some Mac people that wouldn't like that verbage. I'm not into Macs at all. It's just a fact that you shouldn't eliminate a certain part of your users simply because you don't like the hardware and/or operating system they use.

jaegernaut
12-11-2003, 03:07 PM
I'm in complete agreement.

I wouldn't turn people away, but I do understand not having the resources to properly code for different platforms, etc.

The suggestion I gave was just to provide an alternative to refusing them access.

Unless the situation is that you are rolling in customers and just don't need them anymore.
:p

But, hey, I don't even know if this is any kind of retail site.

:D

rhsunderground
12-11-2003, 03:53 PM
the problem is that the people who run the school's servers (satan's little helpers) are based in our computer lab, which uses ALL macs. i've tried and our codes just don't work at all on macs, so i want a little thing that pops up to say "you're using a mac---go get a real computer" so that if the evil computer ladies try to find out what we're doing, they can't see it. that's what i hope, anyway.

rhsunderground
12-12-2003, 09:46 AM
i got it --->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

<title>Untitled</title>
<script>
var testage=navigator.platform
function satanTest() {
if (testage=='MacPPC') {window.location="macpage.html"}
else {window.location="loveit.html"}
}
</script>

</head>

<body onload="satanTest()">



</body>
</html>

rhsunderground
12-12-2003, 09:47 AM
thanks for the help.

fredmv
12-12-2003, 12:41 PM
<script type="text/javascript">
//<![CDATA[
onload = function() { location = (/mac/gi.test(navigator.platform)) ? 'mac.html' : 'main.html'; }
//]]>
</script>