Re: IE6/7+Vista check

Giganews Newsgroups
Subject: Re: IE6/7+Vista check
Posted by:  Jeremy J Starcher (r3jjs@yahoo.spam.me.not.com)
Date: Fri, 23 Nov 2007

On Sat, 17 Nov 2007 12:08:50 +0100, Marooned wrote:

>
> Hi (a total newbie here), I run a small personal website and I need to
> check if my client is reaching my site with:
>
> - IE6 || IE7
> AND
> - Windows Vista
>
> How can I do? The script should work in Firefox too...
>
> Thanks!!

Google for 'Conditional Comments' -- a Microsoft-only feature that allows
certain blocks of HTML to be run by different versions of the browser.

No way that I know of to reliably check if they are running under Vista.
All methods I know of are very flawed and I would not trust them.

That said:  It is doubtful that this is what you want to do.  There are
precious few reasons for needing to check exactly what browser and
operating system someone is using.  If you need a feature, check for that
feature.  Google for 'Feature detection' and pay head.  Its well worth
learning.

If you are trying to see what operating system someone is visiting from in
order to download a product, then there is a bit of code on referenced on
this site that will GUESS what is being used.  It is only a guess.  Give
your user another way to download what he really wants.  (Its not
uncommon for me to download Windows software using my Linux machine and
either run it under WINE or install it on a windows box elsewhere.)

If you are trying to collect stats about who is visiting your site:  Not
worth it. As flawed as feature detection and more dangerous.  A sizeable
number of people running other browsers have their browser lie about who
they are in order to get into IE only sites.

Replies

In response to

IE6/7+Vista check posted by Marooned on Sat, 17 Nov 2007