Justin Koivisto a écrit :[color=blue]
> Gérard Talbot wrote:
>
>[color=green]
>>Justin Koivisto wrote :
>>
>>[color=darkred]
>>>Does anyone know if there is a quick test to tell if Safari 1.3 (or 2.0
>>>will suffice) is the browser that doesn't rely on the typical
>>>navigator.* methods? For instance, there is the good 'ol document.all
>>>test for MSIE... Looking to add Safari support to my tty editor for my
>>>cms.[/color]
>>
>>Developing Cross Browser/Cross Platform Pages:
>>Browser identification (aka "browser sniffing"): not best, not reliable
>>approach;
>>Using Object/Feature detection: best and overall most reliable
>>
http://www.mozilla.org/docs/web-deve...evCrossBrowser[/color]
>
>
> This was my initial read quite a few months ago....
>[/color]
I personally updated that document a few weeks ago, even just a few days
ago.
[color=blue]
>[color=green]
>>A Strategy That Works: Object/Feature Detecting by comp.lang.javascript
>>newsgroup FAQ notes
>>
http://jibbering.com/faq/faq_notes/n...tect.html#bdFD[/color]
>
>
> Has code very similar to what I am doing on my devel version already...
>
>[color=green]
>>Browser detection - No; Object detection - Yes by Peter-Paul Koch
>>
http://www.quirksmode.org/js/support.html[/color]
>
>
> Which is what I am looking to do...
>
> I know I have a big rewrite ahead for my editor, but I just need a quick
> fix for now, and I know that the navigator.* methods aren't going to work.
>
> <rant>
> Why is it that when I post a question to usenet that gets replies, they
> quite frequently don't answer question asked?
> </rant>
>[/color]
I thought it was more appropriate to give you useful reading on the
issue than a specific answer to a question which may proceed from a
wrong analysis, a wrong perception of a website difficulty/issue.
There are serious chances that several ways to detect MSIE 7 will fail
because many webpages rely on poor cross-browser pages to begin with. (1)
In a few weeks from now, I'm sure this newsgroup will have questions like:
"is there a quick test to tell if IE 7 is the browser?"
And the logical answer is you do not need some sort of script trick to
detect browser and browser versions to begin with if your code relies on
object/feature detection. That is the current best available answer to
the issue of cross-browser support.
Gérard
--
remove blah to email me
(1) "we continue our testing of IE7 we continue to come across web sites
that are not expecting version 7 of the browser. Often they helpfully
suggest an upgrade to an alternative browser or to IE5 or later."
IE 7 user agent string July 13th 2005
http://blogs.msdn.com/dmassy/archive...13/438625.aspx
On May 11th 2005, I rewrote the entire section of cross-browser
development and updated an example with a browser sniffing example which
would fail to deal with IE 7.