User Agent Detection Logic

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Cornford

    #31
    Re: User Agent Detection Logic

    "HikksNotAtHome " <hikksnotathome @aol.com> wrote in message
    news:2003092322 5307.12501.0000 2640@mb-m04.aol.com...[color=blue][color=green][color=darkred]
    >>>Sure. For the same reason I do not need to read the
    >>>bible in order to be a good Christian.[/color]
    >>
    >>Judging by your posts to microsoft.publi c.scripting.jsc ript under
    >>this subject you are not a good Christian so perhaps you should RTFM.[/color]
    >
    >His last post being the one to me that convinced me he was under
    >the false impression he possesses some intelligence.[/color]

    Yes, that is exactly the post that I had in mind. Resorting to
    unsubstantiated sarcastic abuse did not strike me as consistent with the
    teachings of Christ as reported in the Bible (not that I have any
    expertise, being an atheist, but I am not unfamiliar with scripture),
    nor as the resort of someone who believes they have a valid rational for
    their position.
    [color=blue]
    >My hats off to you Richard, you have argued your point
    >(successfull y) with the moron way longer than I ever would have.[/color]

    Well, it is not as if it was ever possible to fail when arguing against
    userAgent string based browser detection (as Steve pointed out a couple
    of days ago). Not that I was expecting to convince him. To be convinced
    by reasoned argument you have to be rational (and possibly intelligent)
    to start with (and the ability to accurately comprehend written English
    would also have been useful in this context).

    My main motivation is to provide a service to those who may in future,
    believing that they need to detect browsers, search c.l.j. on google and
    find their keywords directing them to this thread. I would not want them
    to go away the impression that browser detecting by userAgent string was
    a good idea, possible, acceptable ,actually necessary or in any way
    endorsed by this group, and to give some alternative keywords to search
    on. There is no need to let people who are new to the subject repeat the
    mistakes of the past.

    I suspect you had a similar intention when responding to him on
    microsoft.publi c.scripting.jsc ript.

    Richard.


    Comment

    • Richard Cornford

      #32
      Re: User Agent Detection Logic

      "Fotios" <f_bass@yahoo.c om> wrote in message
      news:3f71fd18$0 $215$bed64819@n ews.gradwell.ne t...
      <snip>[color=blue]
      >I don't believe that continuing this thread has anything more
      >to offer to the group or us.[/color]

      So a thread in which you have challenged people to reply to your points
      at least twice comes to an end when you find yourself unable to respond
      to mine. That suites me, and I would agree that the subject has been
      satisfactorily addressed.

      <snip>[color=blue]
      >My views on the subject have basically been expressed to a good
      >extend in my last two lengthy posts.[/color]

      Yes they have, and my last two lengthy posts have addressed them all.
      [color=blue]
      >I want to believe that everybody's (whether reader or poster)
      >grasp of the involved issues has been either improved or refreshed.[/color]

      Maybe some readers, I don't think that any of the other posters in this
      thread have seen anything that they were not already familiar with.
      [color=blue]
      >At the very least, we got the fairly new idea of deceiving
      >objects to show for.[/color]

      Fairly new idea? That concept was in the FAQ when you supposedly read it
      two years ago. c.l.j. has been discussing and refining the techniques of
      feature/object detecting on a regular basis for as long as I have been
      reading it. That is why we are all so confident that it is the _only_
      viably approach to Internet browser scripting. (Though individual
      opinions on how the technique is best applied still varies, but that is
      what would be expected when individuals address complex problems.)
      [color=blue]
      >Who knows? Maybe Fudgilla will become a reality at some point
      >just to show that there are no certainties except temporary ones.
      >I promise you; it will not be me who puts it together :)[/color]

      And I promise you that if you don't write it nobody else is going to.
      What could possibly motivate anyone else to put their effort into
      writing a browser with a deliberately broken DOM? That is the sort of
      thing that people only do by accident. If they wanted a browser that
      predictably would not execute any existing JavaScript they could just
      strip scripting support from the browser entirely, and if they wanted a
      browser that would only execute their own scripts it would be easier to
      swap the scripting language from JavaScript to some other.

      Richard.


      Comment

      • Fotios

        #33
        Re: User Agent Detection Logic

        Richard,

        I will not deal with the rest of the stuff that you mention (to which I
        disagree) or the fact that you seem to have somehow gotten emotionally
        involved (sorry if I caused this).

        I will not even try to get into a theological discussion with you (which I
        don't see how it is not OT - you being so sensitive about OT stuff).

        I will even hold my ironic remarks to your admission that you are an atheist
        (I don't want you to have a stroke or anything).

        However, I will respond to the following just to demonstrate to you how
        intensive FAQ reading and adherence (and other dogmatisms) can impair
        imagination.
        [color=blue]
        >
        > And I promise you that if you don't write it nobody else is going to.
        > What could possibly motivate anyone else to put their effort into
        > writing a browser with a deliberately broken DOM? That is the sort of
        > thing that people only do by accident.[/color]

        Imagine this dear Richard: Let's say I am an open source proponent who is
        sick and tired of Microsoft's marketing tricks and the way they undermine
        public standards. So, I build this excellent open source browser which
        supports all W3C DOM objects (in a very proper way) but I also choose to
        attack Microsoft in my own way by faking the proprietary Microsoft objects
        or methods/properties; that is they exist but they give erroneous values
        (like: "Billy is a custard face" instead of some other string that is
        expected). Why would I do that? But because this way I would break scripts
        that try to support these objects. This would be an angry open sourcer's way
        of fighting back and saying out loud "Scripters! Do not script for
        Microsoft's proprietary objects/methods/properties that antagonize and
        undermine W3C standards". Extreme in a way but I think conceivable - in my
        opinion, not more extreme that having Shakespeare quotes as your agent
        string.

        F.




        Comment

        • Jim Ley

          #34
          Re: User Agent Detection Logic

          On Thu, 25 Sep 2003 10:42:11 +0100, "Fotios" <f_bass@yahoo.c om> wrote:

          [color=blue]
          > I also choose to
          >attack Microsoft in my own way by faking the proprietary Microsoft objects
          >or methods/properties; that is they exist but they give erroneous values
          >(like: "Billy is a custard face" instead of some other string that is
          >expected).[/color]

          Well the script will almost certainly reject your browser when it
          checks for the document object, which doesn't exist in the W3 DOM.

          However the object detection technique, will have no problem with
          this, consider document.all.ch icken returning your string instead of
          an object, that will fail when you check the chicken object is what
          you expect, or that the chicken.style is indeed an object, your
          intentional spoofing only works if you don't spoof objects, but make
          them do intentionally wrong things (e.g. have a style visibility
          change the colour instead or something) So you'd have to deliberately
          break the objects behaviour not just have them return a string.

          However, all of it's academic, as you've implemented the W3 DOM, and
          clj has always advocated checking and using that first, so our scripts
          won't see your mess, just old ones...
          [color=blue]
          >Do not script for
          >Microsoft's proprietary objects/methods/properties that antagonize and
          >undermine W3C standards".[/color]

          Except of course that doesn't work, because the W3 simply hasn't
          standardised huge gaping holes which are requied to do any scripting,
          de facto standards are required.

          Jim.
          --
          comp.lang.javas cript FAQ - http://jibbering.com/faq/

          Comment

          • kaeli

            #35
            Re: User Agent Detection Logic

            In article <3f71f76f$0$213 $bed64819@news. gradwell.net>, f_bass@yahoo.co m
            enlightened us with...[color=blue]
            >[color=green]
            > >
            > > Haven't you yet learned the futility of trying to have a debate with the
            > > mentally challenged? :p
            > > Don't have a battle of wits with an unarmed opponent. It isn't nice.
            > >
            > > Or are you just playing with him because you're bored? *LOL*[/color]
            >
            > heehee! Kaeli, you are such a cutie! *LOL* ooooxxxx
            >
            > New agey love,
            > F.
            > --[/color]


            *snicker*

            smooches!

            -------------------------------------------------
            ~kaeli~
            All I ask for is the chance to prove that money
            cannot make me happy.


            -------------------------------------------------

            Comment

            • Albert Wagner

              #36
              Re: User Agent Detection Logic

              On Thu, 25 Sep 2003 04:29:45 +0100
              "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
              <snip>[color=blue]
              > I would not want them
              > to go away the impression that browser detecting by userAgent string
              > was a good idea, possible, acceptable ,actually necessary or in any
              > way endorsed by this group, and to give some alternative keywords to
              > search on. There is no need to let people who are new to the subject
              > repeat the mistakes of the past.[/color]

              I note the use of the phrase: "actually necessary." Is there some
              concensus, even among a few, that browser detection, of any kind, is not
              necessary or desirable? I am new to JavaScript and am just curious. At
              this point I have doing HTML strict 4.01 on Opera 7.11, with no concern
              for cross-browser compatibility.


              --
              Don't you see that the whole aim of Newspeak is to narrow the range of
              thought? In the end we shall make thoughtcrime literally impossible,
              because there will be no words in which to express it.
              -- George Orwell, 1984

              Comment

              • Fotios

                #37
                Re: User Agent Detection Logic

                Jim,

                you seem to have comprehension problems.

                F.

                "Jim Ley" <jim@jibbering. com> wrote in message
                news:3f72cec0.1 31932058@news.c is.dfn.de...[color=blue]
                > On Thu, 25 Sep 2003 10:42:11 +0100, "Fotios" <f_bass@yahoo.c om> wrote:
                >
                >[color=green]
                > > I also choose to
                > >attack Microsoft in my own way by faking the proprietary Microsoft[/color][/color]
                objects[color=blue][color=green]
                > >or methods/properties; that is they exist but they give erroneous values
                > >(like: "Billy is a custard face" instead of some other string that is
                > >expected).[/color]
                >
                > Well the script will almost certainly reject your browser when it
                > checks for the document object, which doesn't exist in the W3 DOM.
                >
                > However the object detection technique, will have no problem with
                > this, consider document.all.ch icken returning your string instead of
                > an object, that will fail when you check the chicken object is what
                > you expect, or that the chicken.style is indeed an object, your
                > intentional spoofing only works if you don't spoof objects, but make
                > them do intentionally wrong things (e.g. have a style visibility
                > change the colour instead or something) So you'd have to deliberately
                > break the objects behaviour not just have them return a string.
                >
                > However, all of it's academic, as you've implemented the W3 DOM, and
                > clj has always advocated checking and using that first, so our scripts
                > won't see your mess, just old ones...
                >[color=green]
                > >Do not script for
                > >Microsoft's proprietary objects/methods/properties that antagonize and
                > >undermine W3C standards".[/color]
                >
                > Except of course that doesn't work, because the W3 simply hasn't
                > standardised huge gaping holes which are requied to do any scripting,
                > de facto standards are required.
                >
                > Jim.
                > --
                > comp.lang.javas cript FAQ - http://jibbering.com/faq/
                >[/color]


                Comment

                • Richard Cornford

                  #38
                  Re: User Agent Detection Logic

                  "Fotios" <f_bass@yahoo.c om> wrote in message
                  news:3f729b4d$0 $217$bed64819@n ews.gradwell.ne t...[color=blue]
                  >I will not deal with the rest of the stuff that you mention
                  >(to which I disagree) or the fact that you seem to have
                  >somehow gotten emotionally involved (sorry if I caused this).[/color]

                  Given your demonstrated shortcomings in extracting literal meaning from
                  written English I think you would be best advised to concentrate on that
                  and abandon efforts to interpret emotional overtones until you have that
                  under your belt. As I recall my emotional response to your last post was
                  nothing more than slight amusment (at the fact that Steve's predicted
                  outcome had come to pass).
                  [color=blue]
                  >I will not even try to get into a theological discussion
                  >with you (which I don't see how it is not OT - you being
                  >so sensitive about OT stuff).[/color]

                  It would be OT, but should you consider yourself properly equipped for a
                  theological discussion if you have not read the Bible?
                  [color=blue]
                  >I will even hold my ironic remarks to your admission that you
                  >are an atheist (I don't want you to have a stroke or anything).[/color]

                  I see no irony (or anything unusual) in an atheist being able to
                  recognise hypocrisy.

                  <snip>[color=blue]
                  >Imagine this dear Richard: Let's say I am an open source
                  >proponent who is sick and tired of Microsoft's marketing
                  >tricks and the way they undermine public standards. So,
                  >I build this excellent open source browser which supports
                  >all W3C DOM objects (in a very proper way) but I also
                  >choose to attack Microsoft in my own way by faking the
                  >proprietary Microsoft objects or methods/properties; that
                  >is they exist but they give erroneous values (like: "Billy
                  >is a custard face" instead of some other string that is
                  >expected). Why would I do that? But because this way I
                  >would break scripts that try to support these objects.
                  >This would be an angry open sourcer's way of fighting
                  >back and saying out loud "Scripters! Do not script for
                  >Microsoft's proprietary objects/methods/properties that
                  >antagonize and undermine W3C standards". Extreme in a way
                  >but I think conceivable - in my opinion, not more extreme
                  >that having Shakespeare quotes as your agent string.[/color]

                  Mozilla already says "Scripters! Do not script for Microsoft's
                  proprietary DOM" by the simple measure of not implementing very much of
                  it (though you might break innerHTML just to be comprehensive).

                  The browser you are describing is not significantly different from the
                  W3C DOM compliant browsers that fake objects from the Microsoft DOM in
                  order to avoid being ostracised by scripts that attempt browser
                  detection by object inference. And feature detecting as a technique
                  already copes quite happily with those browsers. To the best of my
                  recollection, as you describe it this browser is going to happily
                  execute _every_ feature detecting script I have ever written because I
                  have always favoured using W3C DOM methods over proprietary ones, only
                  falling back to a proprietary methods if a W3C DOM approach is not
                  available/functional on the browser.

                  To significantly impact on the effectiveness of feature detecting as a
                  technique you would have to pervert the _entire_ browser DOM well beyond
                  the point at which no existing browser detecting based script could work
                  on it either. And even then the chances are still good that a feature
                  detecting script would recognise its inability to execute and be in a
                  position to degrade cleanly under control, while the browser detection
                  based scripts (assuming that they were allowed the opportunity to run on
                  this unrecognised browser) would just error until they failed entirely.

                  The result would be a browser that could _only_ execute scripts that
                  were specifically written for its perverse DOM. If making scripting the
                  browser require specialist knowledge was the goal of the browser authors
                  then it would be easiest achieved by just switching to a non-standard
                  scripting language, and if the goal was a browser that would not
                  successfully execute anyone's scripts then that would be easiest
                  achieved by just stripping scripting out entirely.

                  That leaves you as the only person motivated to go down the totally
                  perverse DOM route. And yes it may demonstrate that feature detecting
                  scripts cannot cope 100% with anything at all. On the way you have also
                  killed off all browser detecting scripts, so all that such a browser
                  would server to demonstrate is that while feature detecting cannot be
                  100% it is still significantly more robust than browser detecting. I
                  don't see that as contributing in any way towards an argument in favour
                  of browser detecting, quite the reverse.

                  Richard.


                  Comment

                  • Richard Cornford

                    #39
                    Re: User Agent Detection Logic

                    "Albert Wagner" <alwagner@tcac. net> wrote in message
                    news:2003092507 5408.72410c05.a lwagner@tcac.ne t...
                    <snip>[color=blue]
                    >I note the use of the phrase: "actually necessary." Is
                    >there some concensus, even among a few, that browser
                    >detection, of any kind, is not necessary or desirable?[/color]

                    There is complete consensus that browser detecting based on the
                    navigator.userA gent string cannot uniquely identify individual web
                    browsers, that is just a truth. There may be approaches based on object
                    inference that can uniquely identify some (but not all) browsers, but it
                    would be necessary to have complete details of _all_ browser DOMs in
                    order to have any confidence in the results, and that is impractical.
                    The individuals with the widest familiarity with browser DOMs freely
                    admit that even they do not know enough to implement a truly
                    discriminating object inference based browser detecting script. And even
                    if it was done such a script would need to be updated whenever a new
                    browser was released (world wide).

                    So if there are circumstances under which it is *necessary* to uniquely
                    identify a web browsers then the impossibility of doing that becomes an
                    insurmountable problem.

                    People do occasionally propose circumstances under which they believe
                    that they need to identify browsers but these usually turn out to arise
                    due to a lack of understanding of HTML or CSS and when they are genially
                    JavaScript problems there is often either an alternative approach that
                    circumvents the problem or and examination of the logic of the problem
                    indicates a specific test that will discriminate browsers that have the
                    problem from those that don't without the need to know which browsers
                    those are. And, of course, there are a few things that just cannot be
                    done (or tested) with sufficient reliability to be appropriately used
                    outside of an Intranet.

                    There is a very wide consensus (at least among those knowledgeable about
                    browser scripting) that testing the features specifically required by a
                    particular script is the only viable technique for cross-browser
                    scripting, thus side-stepping the fact that browsers cannot be uniquely
                    identified by never asking that question.

                    You can judge the support for browser detection by the total number of
                    people contributing to this thread in support of that approach.
                    [color=blue]
                    >I am new to JavaScript and am just curious. At this
                    >point I have doing HTML strict 4.01 on Opera 7.11, with
                    >no concern for cross-browser compatibility.[/color]

                    Client-side Internet JavaScript is probably unique in computer
                    programming terms in that it has to be authored with zero certainty
                    about the environment in which it will be executing. To be effective its
                    authors have to embrace that fact and adopt a different attitude towards
                    achieving their goals. But without that challenge cross-browser
                    scripting would be no more interesting than working with many other
                    programming languages. I would always recommend aspiring to author
                    cross-browsers scripts. After all a cross-browser scripter can author
                    for any specific browsers, the reverse is not true.

                    Richard.


                    Comment

                    • Fotios

                      #40
                      Re: User Agent Detection Logic

                      Richard,

                      your lengthy mantras serve to prove my point perfectly. On the other hand
                      your attempt to prove that my point is of no real significance is pathetic.
                      Anyone who can think straight can see how a browser like the one I have
                      described would make the detection style you are a proponent of a big
                      problem in many cases. Perhaps I should I write an FAQ for you in order to
                      understand.

                      F.


                      Comment

                      • Lasse Reichstein Nielsen

                        #41
                        Re: User Agent Detection Logic

                        "Fotios" <f_bass@yahoo.c om> writes:
                        [color=blue]
                        > Anyone who can think straight can see how a browser like the one I have
                        > described would make the detection style you are a proponent of a big
                        > problem in many cases.[/color]

                        A browser that implements W3C DOM perfectly[1], but which maliciously
                        distorts proprietary IE features, will work perfectly with object
                        detection ... because you should always test for W3C DOM first.

                        /L
                        [1] Including widely accepted non-W3C objects that are not originated
                        at Microsoft, e.g., the global "document" and "window" variables.
                        --
                        Lasse Reichstein Nielsen - lrn@hotpop.com
                        Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
                        'Faith without judgement merely degrades the spirit divine.'

                        Comment

                        • Fotios

                          #42
                          Re: User Agent Detection Logic

                          [color=blue]
                          >
                          > A browser that implements W3C DOM perfectly[1], but which maliciously
                          > distorts proprietary IE features, will work perfectly with object
                          > detection ... because you should always test for W3C DOM first.[/color]

                          Lasse,

                          Have you noticed how you are suddenly on a "should" basis?

                          F.


                          Comment

                          • Jim Ley

                            #43
                            Re: User Agent Detection Logic

                            On Thu, 25 Sep 2003 23:25:17 +0100, "Fotios" <f_bass@yahoo.c om> wrote:
                            [color=blue][color=green]
                            >> A browser that implements W3C DOM perfectly[1], but which maliciously
                            >> distorts proprietary IE features, will work perfectly with object
                            >> detection ... because you should always test for W3C DOM first.[/color]
                            >
                            >Have you noticed how you are suddenly on a "should" basis?[/color]

                            Well you're the perfect example of how people don't understand object
                            detection... what other word than SHOULD do you think Lasse should be
                            using? it can't be MUST, we have no control over people, so what
                            exactly do you suggest?

                            Jim.
                            --
                            comp.lang.javas cript FAQ - http://jibbering.com/faq/

                            Comment

                            • Fotios

                              #44
                              Re: User Agent Detection Logic


                              [color=blue]
                              > Well you're the perfect example of how people don't understand object
                              > detection... what other word than SHOULD do you think Lasse should be
                              > using? it can't be MUST, we have no control over people, so what
                              > exactly do you suggest?[/color]

                              No, it should be SHOULD which is exactly my point. To make it more explicit
                              for you, gone is the certainty that object and property checking just works.

                              BTW, the first Fudgilla Service Pack was released. Fudgilla will now check
                              for instances of proprietary Microsoft objects/properties anywhere in the
                              script and if it finds even one it will mess up the script anyway.

                              F.



                              Comment

                              • Jim Ley

                                #45
                                Re: User Agent Detection Logic

                                On Thu, 25 Sep 2003 23:48:01 +0100, "Fotios" <f_bass@yahoo.c om> wrote:
                                [color=blue]
                                >
                                >[color=green]
                                >> Well you're the perfect example of how people don't understand object
                                >> detection... what other word than SHOULD do you think Lasse should be
                                >> using? it can't be MUST, we have no control over people, so what
                                >> exactly do you suggest?[/color]
                                >
                                >No, it should be SHOULD which is exactly my point. To make it more explicit
                                >for you, gone is the certainty that object and property checking just works.[/color]

                                Of course it does work if it's written correctly, however your user
                                agent sniffing cannot be written correctly in such manner that works
                                with even known browsers, you're relying on some very weird
                                hypothetical browser that does not exist - making it with IE would be
                                pretty easy.
                                [color=blue]
                                >BTW, the first Fudgilla Service Pack was released. Fudgilla will now check
                                >for instances of proprietary Microsoft objects/properties anywhere in the
                                >script and if it finds even one it will mess up the script anyway.[/color]

                                So it will "mess up the script" across the proprietary Microsoft
                                object like "document" then? and pray tell me how this is done, the
                                code analysis methods would be really useful to me for other things,
                                any language is good.

                                Jim.
                                --
                                comp.lang.javas cript FAQ - http://jibbering.com/faq/

                                Comment

                                Working...