HighDots Forums  

Detecting Internet Explorer 6

Javascript JavaScript language (comp.lang.javascript)


Discuss Detecting Internet Explorer 6 in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Swifty
 
Posts: n/a

Default Detecting Internet Explorer 6 - 10-31-2009 , 04:43 AM






I know that detecting the browser is frowned upon here, but I have a
need to identify specifically Internet Explorer 6.

My company ships all employees a PC containing IE6, and we are
discouraged from upgrading it. We can (and many do) install other
browsers, but some corporate applications are 100% dependant on IE6.

However, next year (about halfway through), we are going to force the
installation of Firefox onto all systems, and it is speculated that it
may become the default browser as well. Maybe not at the same time.

I'd like to update my webpages with a "This page best viewed with almost
anything except Internet Explorer 6" message, to encourage my users to
try something else (probably Firefox). This way, I'll be able to shake
out any bugs before the "big bang" day…

Of course, I test all my pages against Firefox (and Opera, Safari,
Chrome) but my users are far better at finding my bugs than I am.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Reply With Quote
  #2  
Old   
SAM
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 07:26 AM






Le 10/31/09 9:43 AM, Swifty a écrit :
Quote:
I'd like to update my webpages with a "This page best viewed with almost
anything except Internet Explorer 6" message, to encourage my users to
try something else (probably Firefox).
<!--[if IE]>
<h1 style="color:red;text-align:center">
This page best viewed with almost anything except Internet Explorer
</h1>
<![endif]-->

or :

<!--[if IE 6]>
<div style="color:red;border:double 4px;text-align:center">
<h1>
This page best viewed with almost anything except Internet Explorer 6
</h1>
<p>
Download and install <a href="www.mozilla.com/firefox/">FireFox</a>
</p>
</div>
<![endif]-->

--
sm

Reply With Quote
  #3  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 07:41 AM



Swifty <steve.j.swift (AT) gmail (DOT) com> writes:

Quote:
I know that detecting the browser is frowned upon here, but I have a
need to identify specifically Internet Explorer 6.
The best way is conditional comments:
<!--[if IE 6]>
something here that only IE 6 treats as a non-comment.
<![endif]-->

See <URL:http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx>

Quote:
My company ships all employees a PC containing IE6, and we are
discouraged from upgrading it. We can (and many do) install other
browsers, but some corporate applications are 100% dependant on IE6.
I thought they would have fixed that by now.

Quote:
However, next year (about halfway through), we are going to force the
installation of Firefox onto all systems, and it is speculated that it
may become the default browser as well. Maybe not at the same time.
About time! Well, as long as they don't start using proprietart
Firefox features instead. Writing to standards should make things
work in all modern browsers.

....
Quote:
Of course, I test all my pages against Firefox (and Opera, Safari,
Chrome) but my users are far better at finding my bugs than I am.
It should be possible to have more than one IE installed at the same
time (with some quirkyness).
See, e.g., <URL:http://tredosoft.com/IE7_standalone> (although it's
probably outdated by now). So you can test even more browsers

/L
--
Lasse Reichstein Holst Nielsen
'Javascript frameworks is a disruptive technology'

Reply With Quote
  #4  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 07:43 AM



Swifty wrote:

Quote:
I know that detecting the browser is frowned upon here, but I have a
need to identify specifically Internet Explorer 6.
[...]
I'd like to update my webpages with a "This page best viewed with almost
anything except Internet Explorer 6" message, to encourage my users to
try something else (probably Firefox). This way, I'll be able to shake
out any bugs before the "big bang" day…

Of course, I test all my pages against Firefox (and Opera, Safari,
Chrome) but my users are far better at finding my bugs than I am.
Conditional Comments are your best bet, not scripting.


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

Reply With Quote
  #5  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 07:46 AM



Lasse Reichstein Nielsen wrote:

Quote:
It should be possible to have more than one IE installed at the same
time (with some quirkyness).
It is.

Quote:
See, e.g., <URL:http://tredosoft.com/IE7_standalone> (although it's
probably outdated by now).
<http://my-debugbar.com/wiki/IETester/HomePage>


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann

Reply With Quote
  #6  
Old   
Swifty
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 02:34 PM



SAM wrote:
Quote:
Le 10/31/09 9:43 AM, Swifty a écrit :

I'd like to update my webpages with a "This page best viewed with
almost anything except Internet Explorer 6" message, to encourage my
users to try something else (probably Firefox).

!--[if IE]
h1 style="color:red;text-align:center"
This page best viewed with almost anything except Internet Explorer
/h1
![endif]--
For some strange reason I haven't come across conditional comments until
now. I must lead a sheltered life. Thanks!

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Reply With Quote
  #7  
Old   
Swifty
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 03:10 PM



Thomas 'PointedEars' Lahn wrote:
Quote:
Lasse Reichstein Nielsen wrote:

It should be possible to have more than one IE installed at the same
time (with some quirkyness).

It is.

See, e.g., <URL:http://tredosoft.com/IE7_standalone> (although it's
probably outdated by now).

http://my-debugbar.com/wiki/IETester/HomePage
I'm too scared to tinker with anything as closely integrated with
Windows as IE. After years without problems, my XP has become unstable
(Insufficient Quota), and I have to reboot daily. I'm avoiding anything
that may push it over the edge; I'll be getting a replacement PC shipped
to me in six months time anyway (curiously, about the sametime as the
Firefox changes).

But thanks anyway. I may still need to test IE6/7/8 in future, as IE6
will remain on the Corporate PC Image for quite a while, I expect. The
IE Tester looks perfect for that (as it should).


--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Reply With Quote
  #8  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 03:26 PM



Swifty wrote:

Quote:
Thomas 'PointedEars' Lahn wrote:
http://my-debugbar.com/wiki/IETester/HomePage

I'm too scared to tinker with anything as closely integrated with
Windows as IE. After years without problems, my XP has become unstable
(Insufficient Quota), and I have to reboot daily. I'm avoiding anything
that may push it over the edge; I'll be getting a replacement PC shipped
to me in six months time anyway (curiously, about the sametime as the
Firefox changes).
As always, fear is a bad advisor. An installation of Standalone IE or IE
Tester does not touch the existing DLLs, it provides its own located in its
program directory. However, IE Tester allows you to use the existing ones
when and if it is conventient with the "Default IE" browsing tab.


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7 (AT) news (DOT) demon.co.uk> (2004)

Reply With Quote
  #9  
Old   
David Mark
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 03:32 PM



On Oct 31, 2:34*pm, Swifty <steve.j.sw... (AT) gmail (DOT) com> wrote:
Quote:
SAM wrote:
Le 10/31/09 9:43 AM, Swifty a écrit :

I'd like to update my webpages with a "This page best viewed with
almost anything except Internet Explorer 6" message, to encourage my
users to try something else (probably Firefox).

!--[if IE]
h1 style="color:red;text-align:center"
This page best viewed with almost anything except Internet Explorer
/h1
![endif]--
That presumes your visitors know what Internet Explorer is (and that
they are in a position to replace it with something else). Not on the
Web anyway.

Quote:
For some strange reason I haven't come across conditional comments until
now. I must lead a sheltered life. Thanks!
Sounds more like hell to me. Of course, you really shouldn't need to
do much more than add zoom:1 here and there (adds "layout" to the
element in IE-speak). Don't use them as a crutch.

Reply With Quote
  #10  
Old   
Dr J R Stockton
 
Posts: n/a

Default Re: Detecting Internet Explorer 6 - 10-31-2009 , 06:21 PM



In comp.lang.javascript message <e4WdnckhUoAkZXbXnZ2dnUVZ8s-
dnZ2d (AT) brightview (DOT) com>, Sat, 31 Oct 2009 08:43:31, Swifty
<steve.j.swift (AT) gmail (DOT) com> posted:
Quote:
I know that detecting the browser is frowned upon here, but I have a
need to identify specifically Internet Explorer 6.
Testing either
(0.007).toFixed(2)
or
S = "3000000000000000000000000" ; parseFloat(S+".0")/parseFloat(S)
will identify IE : the second in at least IE 4 to IE 8, and the first in
all versions from the introduction of toFixed to IE 8. Use those in
addition to conditional compilation, and you have belt-and-braces.

There is, I suppose, some risk of MS correcting those bugs; but that
will not worry you.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.