473,761 Members | 4,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which IE browser version?

Does anyone have a quick script to find which version of IE a page is
being viewed with?

Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.

I expect I'll have to search out the (navigator.appA gent) string for
the MSIE substring, but since I don't need it until tomorrow, laziness
dictates I ask here before getting on with it. Is there another
variable? a less cumbersome way?

Thanks in advance.

Wade

Jul 23 '05 #1
12 1770
Wade G. Pemberton wrote:
Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.


Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

IE versions below 5.0 do not support the W3C DOM, so this may be one
indicator. Along with testing for document.all, this should suffice.
AFAIK Opera implements document.all but it also implements the W3C-DOM.
I do not know about IE for the Mac, it is likely to be different there.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.
HTH

PointedEars
Jul 23 '05 #2
In article <41************ ***@sprynet.com >, w_*********@spr ynet.com
enlightened us with...
Does anyone have a quick script to find which version of IE a page is
being viewed with?

Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.


Browser detection is usually a big no-no for various reasons, but if you just
want to distinguish between IE versions, use IE-specific code (ignored by
other browsers).

IE conditional comments:
http://msdn.microsoft.com/workshop/a...omment_ovw.asp

I don't think too many people use IE4 these days, though.

--
--
~kaeli~
All I ask is the chance to prove that money cannot make me
happy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3
Thomas 'PointedEars' Lahn wrote:
Wade G. Pemberton wrote:
Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.


Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

IE versions below 5.0 do not support the W3C DOM, so this may be one
indicator. Along with testing for document.all, this should suffice.
AFAIK Opera implements document.all but it also implements the W3C-DOM.
I do not know about IE for the Mac, it is likely to be different there.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.


In addition to what Thomas has said, you may want to consider Conditional
Comments:

<url:
http://msdn.microsoft.com/workshop/a...omment_ovw.asp />

Yes, it's Internet Explorer only, but after all, you're trying to determine
IE versions, so it's not a problem that it's a proprietary way of doing that.
The Conditional Comments and Downlevel-hidden Conditional Comments degrade
quite nicely. I'm not sure about support for Conditional Comments on the MAC,
then again, you probably don't want it telling people to upgrade to version 6
on the MAC since there is no such animal.

You're probably looking for something like:

<!--[if lt IE 6]>
<P>Please upgrade to Internet Explorer 6.</P>
<![endif]-->
<![if !lt IE 6]>
<!-- content intended for IE 6 and other browsers -->
<![endif]>

You can probably identify IE 6SP1 more accurately using more specific version
numbers (<!--[if lt IE 6.0.2800]>). Read "Version Vectors" on the URL I
provided for more information (and some warnings) about targeting too
specific a version.

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq

Jul 23 '05 #4
Wade G. Pemberton wrote:
Does anyone have a quick script to find which version of IE a page is
being viewed with?
Yes, I have on.
Specifically, I want to seperate version 4 from versions 5+, and post a
warning against using 4.
Then do it.

"If you are using Internet Explorer 4, I (the uninformed web author)
think its un-advisable for you to use it, even though I have absolutely
no idea why you use it. Yes, it could be because your computer won't run
anything better, and if thats the case then I don't want your business
so I am telling you to use a newer browser"
I expect I'll have to search out the (navigator.appA gent) string for
the MSIE substring, but since I don't need it until tomorrow, laziness
dictates I ask here before getting on with it. Is there another
variable? a less cumbersome way?
navigator.appAg ent?? Did they sneak that one in? I think you are
referring to the userAgent string (laziness prevents me looking it up).
As for your solution, since your homework was already due today, my
laziness (once again) prevents me from copy/pasting the code you need.

Hint: Read Grant and Kaeli's replies.
Thanks in advance.


You are welcome.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #5


Thomas :
Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.


I'm not doing anything so dramatic as warning people about security issues.

I'm using some inline styles to display photos, titles, atl tags,
descriptions etc in one viewing area, and want to warn folks with really old
browsers that the page will blow up if they push the buttons. Netscape 4.x
is easy to detect, and give a warning. I'm not sure there are too many IE
4.0's out there, but they're worse in terms of supporting dynamics, so I
decided to add a warning for them. It's just an afterthought, and I was
curious to see if anyone had rendered a quick script that split IE4.0 from
IE 5.0 and ff. ( MS insists they're all 4.0 in response to the simplistic
versionApp query).

I don't care if they are all insecure, don't care if they are smart enough to
spoof the sniffer (since that means they're not likely too old), and am not
really looking for the ultimate sniffer. Just one line the effectively
splits 4.0 from 5.0.

However, I did read your references, which served to catch me up on an area
I'd not paid much attention to in recent months/years. Thanks for the
time.
Wade
Jul 23 '05 #6
Wade G. Pemberton wrote:
Thomas :
Instead of a personal salutation which is quite nonsensical in a m:n medium
like NetNews, you should have provided a short attribution line so that the
quoted text can be assigned to its respective author without looking up the
thread structure (if still available).
Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.


I'm not doing anything so dramatic as warning people about security
issues.


Then you should refrain from annoying your users like this.
I'm using some inline styles to display photos, titles, atl tags,
descriptions etc in one viewing area, and want to warn folks with
really old browsers that the page will blow up if they push the
buttons.
If they deliberately chose a buggy browser, let them.
Netscape 4.x is easy to detect,
Is it really?
and give a warning. I'm not sure there are too many
IE 4.0's out there, but they're worse in terms of supporting dynamics, so
I decided to add a warning for them.
Instead of pursuing such a nonsense you should pursue a solution of
graceful degradation as often discussed in this newsgroup. Especially
CSS provides quite easy ways to do so:

<http://www.w3developme nt.de/css/hide_css_from_b rowsers/>
It's just an afterthought, and I was curious to see if anyone had
rendered a quick script that split IE4.0 from IE 5.0 and ff. ( MS

insists they're all 4.0 in response to the simplistic versionApp query).

It is because they are in a sense on the level of Mozilla/4.0. Because
historically evolved, most of the User-Agent header of Web browsers,
especially the navigator.appNa me and navigator.appNa me components, has
become meaningless.
PointedEars
Jul 23 '05 #7
Wade G. Pemberton wrote:
Thomas :
Instead of a personal salutation which is quite nonsensical in a m:n medium
like NetNews, you should have provided a short attribution line so that the
quoted text can be assigned to its respective author without looking up the
thread structure (if still available).
Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.


I'm not doing anything so dramatic as warning people about security
issues.


Then you should refrain from annoying your users like this.
I'm using some inline styles to display photos, titles, atl tags,
descriptions etc in one viewing area, and want to warn folks with
really old browsers that the page will blow up if they push the
buttons.
If they deliberately chose a buggy browser, let them.
Netscape 4.x is easy to detect,
Is it really?
and give a warning. I'm not sure there are too many
IE 4.0's out there, but they're worse in terms of supporting dynamics, so
I decided to add a warning for them.
Instead of pursuing such a nonsense you should pursue a solution of
graceful degradation as often discussed in this newsgroup. Especially
CSS provides quite easy ways to do so:

<http://www.w3developme nt.de/css/hide_css_from_b rowsers/>
It's just an afterthought, and I was curious to see if anyone had
rendered a quick script that split IE4.0 from IE 5.0 and ff. ( MS
insists they're all 4.0 in response to the simplistic versionApp query).


It is because they are in a sense on the level of Mozilla/4.0. Because
historically evolved, most of the User-Agent header of Web browsers,
especially the navigator.appNa me and navigator.appVe rsion components,
has become meaningless.
PointedEars
Jul 23 '05 #8
Thomas 'PointedEars' Lahn wrote:
Wade G. Pemberton wrote:

Thomas :

Instead of a personal salutation which is quite nonsensical in a m:n medium
like NetNews, you should have provided a short attribution line so that the
quoted text can be assigned to its respective author without looking up the
thread structure (if still available).


If they over-attribute, you whine. If they under-attribute, you whine.

Are you actually as anally retentive as you act?

Before anyone else suggests it: Using the User-Agent header is not
reliable <http://pointedears.de/scripts/test/whatami>. If know that
Norton Internet Security modifies, even removes the User-Agent header.

Yet the warning should be issued for all IEs below 6.0 SP-1 where many
security bugs have been fixed.


I'm not doing anything so dramatic as warning people about security
issues.

Then you should refrain from annoying your users like this.


You must be.
I'm using some inline styles to display photos, titles, atl tags,
description s etc in one viewing area, and want to warn folks with
really old browsers that the page will blow up if they push the
buttons.

If they deliberately chose a buggy browser, let them.


You are making the unfounded assumption that they have a "choice" about
the browser. You really should learn to read up on things before you
babble incoherently about things.
Netscape 4.x is easy to detect,

Is it really?


Yes, it is quite easy actually.
and give a warning. I'm not sure there are too many
IE 4.0's out there, but they're worse in terms of supporting dynamics, so
I decided to add a warning for them.

Instead of pursuing such a nonsense you should pursue a solution of
graceful degradation as often discussed in this newsgroup. Especially
CSS provides quite easy ways to do so:

<http://www.w3developme nt.de/css/hide_css_from_b rowsers/>


You really are as stupid as you act. The only reason you have not joined
George in the trash-can is because I don't want innocent people
believing your garbage nonsense.

Also, you should check into your User Agent for News, it seems to be
quite adept at double-posting articles. In the event you do it to make
sure they read it twice, I can almost guarantee that if they don't
comprehend your babble the first time, reading it twice won't help them.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #9
Randy Webb wrote:
Thomas 'PointedEars' Lahn wrote:
Wade G. Pemberton wrote:
[...]
I'm using some inline styles to display photos, titles, atl tags,
descriptio ns etc in one viewing area, and want to warn folks with
really old browsers that the page will blow up if they push the
buttons.


If they deliberately chose a buggy browser, let them.


You are making the unfounded assumption that they have a "choice" about
the browser. [...]


If they don't have the choice, telling them that something else is
better does not help either. For the rest of your posting, I have
had enough of your "style" for the next month.
PointedEars
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2829
by: John Bentley | last post by:
Note this is crossposted to comp.lang.javacript and microsoft.public.dotnet.scripting. After some Googling and FAQing my understanding of these terms is, crudely: Javascript (3 different definitions): 1. The scripting language originally developed by Netscape. (I offer a Brief handle: "Original Netscape Script") 2. The current implementation of the ECMAscript 262 (3rd ed.) standard by Netscape. (I offer a brief handle: "Current...
133
13265
by: Jane Withnolastname | last post by:
I have a web page that uses an unordered list (<UL>) and the LH (list header) tag. I know LH is a valid tag because it is clearly defined by the W3C here: http://www.w3.org/MarkUp/html3/bulletlists.html The problem is, when I try to validate the page at W3C, it tells me: " element "LH" undefined " My page is 4.01 Transitional, using charset windows-1252. Any ideas why this won't validate?
4
9779
by: The Plankmeister | last post by:
Hi. I'm redesigning my site using CSS and have just decided to start again from scratch as I was using too much javascript to do positioning and stuff. My question is: What version of CSS is it safe to use? Since I last used CSS, version 2, 2.1 and 3 have popped up. Is it still better to use CSS1, or is it safe to use CSS2? Or 2.1? I guess 3 is not a good idea right now. Any comments appreciated...
17
2557
by: lawrence | last post by:
How is it possible that the question "How do I detect which browser the user has" is missing from this FAQ: http://www.faqts.com/knowledge_base/index.phtml/fid/125 and is only here on this with a link to old information that suggests use of "navigator": http://developer.irt.org/script/43.htm
2
8095
by: Craig G | last post by:
is there a way to distinguish whether a client is using IE or Netscape? is there some sorta check i can run on the Page_Load event? or where would be the best place to do this? Cheers, Craig
1
1873
by: Dave Harrington | last post by:
Greetings all - We have a client who uses Lotus Notes as their default e-mail. The version of Lotus they use can run internet explorer windows within Lotus. I'd like to find if they are launching our web application through lotus notes or not. I've stumbled across the following code: private void Button1_Click(object sender, System.EventArgs e)
4
2296
by: Thomas Eichner | last post by:
Hi, does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website), especially HTTP GET and POST data, browser data etc.? I have a hard time finding what really my app is sending and this would be a great help! Thank you very much ! Thomas
14
9852
by: Bit Byte | last post by:
I am looking for a (free) IDE for PHP5 development. I am currently using emac/vim (on Linux) and EditPlus on Windows. But I terribly miss features like: 1. Ability to debug code (i.e. step through code and set breakpoints etc) 2. class browser 3. code browser (like emacs etags command) 4. Intellisense (on Microsoft Platform) Is there any (free?) IDE out there that has these features ?. I came
20
2165
by: Neo Geshel | last post by:
I have been looking into Javascript libraries for the last week or two here, and there are certainly a lot of options out there. http://www.prototypejs.org/ http://mootools.net/ http://mochikit.com/ http://script.aculo.us/ And then there are even add-ons to some of these, such as:
5
3630
by: Mufasa | last post by:
We want to keep track of what OS/Browser people are using for our website. How can I find that out so that I can write it to a DB ? I know how to get it into the DB; I just need to know how to get that stuff in .Net. Thanks. J.
0
9538
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9909
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9788
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6623
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5241
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3889
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.