[thelist] Speaking of detecting: howto detect Javascript on/off?

James Aylard evolt at equilon-mrc.com
Wed Mar 14 14:20:39 CST 2001


Ryan,

> <<What I'm wondering is whether you can use the information from the
> pseudo-image to act on the page on which it resides>>
>
> I'm not sure if I understand this...What information from the server would
> you be interested in?

    None, particularly. First, let's assume that we're not interested in
whether a browser is javascript-enabled simply for statistical purposes.
Instead, we want to tailor the content of the page based on whether or not
the browser is javascript-enabled. What benefit does the pseudo-image
approach give you that the page-redirect approach I described does not?
    Let's say page test.asp contains the single-pixel pseudo-image. The
pseudo-image can pass information back to the server -- say, a querystring
of js=true if javascript is enabled (using jeff's method of replacing the
img src via script) -- which is all fine and good. But, simply based on the
pseudo-image's ability to send information back to the server, test.asp
itself cannot do x if javascript is enabled, or y if it is disabled (the
<noscript> element aside), right? It requires that another page be called
(either by the user clicking on a link, or by a redirect or a meta refresh)
where a session variable, say, will dictate that the browser is either
js-enabled or js-disabled, and the server will send content accordingly.
    My understanding is that the pseudo-image can provide intelligence to
the server about whether javascript is enabled, but it makes no difference
in the browser until another page is called (or the same page called again,
but with the benefit of the intelligence from the pseudo-image). The
pseudo-image provides no ability to alter the page in which it is contained.
Agreed?

James Aylard






More information about the thelist mailing list