Re: javascript commands

"David Woolley" <david@djwhome.demon.co.uk>
> > Yes, but mapping the location object to links in the page would solve
> > that, even give you a choice, no need to implement any of those
features.
>
> Mapping the location object, in that case, is potentially impossible,
> and in practice fairly difficult.  It involves simultaneously executing
> all possible paths through the code.  In the most general case, this
> is the halting problem, and is impossible in finite time, but in more
> practical cases it requires something other than a normal ECMA Script
> interpreter and rather more like (I think) Prolog, or a test coverage
> analysis tool.

Not at all, you run the script N times with the navigator object (and
probably .all/.layers set appropriately for the NN4/IE4 simplistic object
detection) set to spoof the N User Agents you want to spoof, okay that
doesn't gaurantee all paths, but in practice it does cover all usage, and
suffers no scripting problems - I have implemented such a script  and it
suffers from no problems and can easily identify the different links
written into the script.  Obviously some paths may not be found, but they
are likely down to the author checking for some very strange browsers so
you've probably got enough to be vaguely accessible.

> However, as much as anything, my point here was that, if you currently
> get a blank first page it probably means that the site authors believe
> that the site will be unuseable without browser specific extensions
> to DOM0, and will probably give a "please upgrade" page for the
fallback
> case, if they have one.

I think that's complete rubbish, most authors aren't even aware what
their script needs or doesn't need, and this browser detection is more
about choosing which html/css hacks to use to make it look "right" in
IE/NN.

> (Also, although document.all may have been implemneted by many minority
> browsers, it is for the same reason that Lynx would have to do it,
namely
> that authors believe that there are only two brands of browser.  As
very
> few authors feature test for it, it also means forging the browser
identity -
> something already common amongst Lynx users and which causes Lynx to be
> under-reported in statistics.)

The navigator object is very rarely used for statistical gathering and
spoofing here would(especially multiple spoofing which I believe to be
most appropriate for simply widening the pages lynx can at least access.

Jim.

Received on Tuesday, 19 March 2002 05:53:45 UTC