![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
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). |
#12
| |||
| |||
|
|
In comp.lang.javascript message <e4WdnckhUoAkZXbXnZ2dnUVZ8s- dn... (AT) brightview (DOT) com>, Sat, 31 Oct 2009 08:43:31, Swifty steve.j.sw... (AT) gmail (DOT) com> posted: 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. |
#13
| |||
| |||
|
|
[…] The OP wants to target 6 and we know that XMLHttpRequest was not introduced until 7. Combine that with detection of ActiveXObject, window.external, document.documentElement.filters, document.documentElement.style.filter, document.expando, etc. and you can be pretty sure you've got IE6 |
#14
| |||
| |||
|
|
The OP wants to target 6 and we know that XMLHttpRequest was not introduced until 7. *Combine that with detection of ActiveXObject, window.external, document.documentElement.filters, document.documentElement.style.filter, document.expando, etc. and you can be pretty sure you've got IE6 (or at least its version of MSHTML) |
#15
| |||
| |||
|
|
If this is for an intranet, the reason IE is being used is probably because it was the corporate standard. Your message should be honest, something like: "You seem to be using IE 6. It is no longer the standard corporate browser, please upgrade to one of <list suitable browsers>." |
#16
| |||
| |||
|
|
David Mark wrote: The OP wants to target 6 and we know that XMLHttpRequest was not introduced until 7. *Combine that with detection of ActiveXObject, window.external, document.documentElement.filters, document.documentElement.style.filter, document.expando, etc. and you can be pretty sure you've got IE6 (or at least its version of MSHTML) Before I thought that your preferred way to change a light bulb is to turn yourself around the lamp (your "feature detection" stuff was rather convincing on that). |
|
Now I see that I was mistaken: if you are in the misfortune to change a light bulb then you have to call someone so to sit on his shoulders and ask him to turn around while you are holding the bulb. |
|
The correct documented and absolutely reliable way was already given (conditional comments and/or conditional compilation). |
#17
| |||
| |||
|
|
You mean the "stuff" that is now pretty much pervasive? *Name one "major" (or even minor) library that hasn't been influenced by My Library and associated articles. |
|
You realize you are agreeing with Stockton that the JScript toFixed bug is a good inference for IE? |
|
The correct documented and absolutely reliable way was already given (conditional comments and/or conditional compilation). I know. *I recommended the former. *Nobody uses the latter. *Try re- reading the thread. |
#18
| |||
| |||
|
|
[...] Say till very recently Safari didn't have document.compatMode property yet it had two distinct rendering mode like others. So before ver.4 some trickery had to be used. |
#19
| |||||||||
| |||||||||
|
|
David Mark wrote: You mean the "stuff" that is now pretty much pervasive? *Name one "major" (or even minor) library that hasn't been influenced by My Library and associated articles. Never knew about My Library and about its global influence on JavaScript library development. |
|
Something important happened I guess over 6 months when I was not posting and reading c.l.j. Well, it is a huge success I guess to make it in 6 months into all established frameworks. |
|
It is especially amazing given that just 8 months ago you were making only preliminary steps by searching a really robust way to check getElementById availability. |
|
And back in 2008 you stated that "The currently popular general-purpose JavaScript-based frameworks? They are not good and don't seem to be getting any better. *For most, the only way they could get better is if they disappeared." |

|
*(http://groups.google.com/group/comp.lang.javascript/msg/9a930670c1123e82 ) BTW is this My Library as athttp://www.cinsoft.net/mylib.html? |
|
In this case jQuery, MooTools and Prototype.js are very disrespectful by not mentioning you: *http://docs.jquery.com/Contributors *http://mootools.net/developers *http://www.prototypejs.org/core |
|
I found though one David Mark in the "list of individuals who have signed Dojo CLAs": *http://www.dojotoolkit.org/dojo-contributors That must be you? |
|
You realize you are agreeing with Stockton that the JScript toFixed bug is a good inference for IE? What a bs? I always use official documented vendor's tools first, and different bugs and hacks only as the 2nd option. |
|
Say till very recently Safari didn't have document.compatMode property yet it had two distinct rendering mode like others. So before ver.4 some trickery had to be used. |
#20
| |||
| |||
|
|
On Oct 31, 6:21*pm, Dr J R Stockton <reply0... (AT) merlyn (DOT) demon.co.uk wrote: In comp.lang.javascript message <e4WdnckhUoAkZXbXnZ2dnUVZ8s- dn... (AT) brightview (DOT) com>, Sat, 31 Oct 2009 08:43:31, Swifty steve.j.sw... (AT) gmail (DOT) com> posted: 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. What should worry you is other implementations with similar bugs. |
![]() |
| Thread Tools | |
| Display Modes | |
| |