* Philip M. Gollucci <[EMAIL PROTECTED]> [2002-03-27 10:38]:
> Well I've basically taken your route the first time I tried to
> do this a year ago. The other problem is that this requires
> the vistors go to this particular page. If they bookmark to
> another page or type the url of a sublink, this is bypassed,
> and I loose the statistical information. My problem is that
> the PerlLogHandler I've set up isn't actually supposed to ever
> display anything to the browser. (I don't think any
> PerLogHandler anyone writes should send anything to the browser
> as is basically an extension to use instead of the apache's
> access_log file. Although it could if you had a good reason.
> In order for the javascript I gave to get values it has to be
> sent to the browser on a page so its processed my the
> javascript engine in the browsers.
If you are using a PerlTransHandler anyway, you can have one that
sends the client to a particular page if a cookie is not set:
(a) Client requests /foo.html
(b) TransHandler sees that cookie is not set, does an internal
redirect to /js-set-cookie.html, which does some (client
size) js magic and transparantly redirects to the
cookie-setting page, which sets the cookie and does its
own redirect.
(c) TransHandler gets this request as well (it was an external
redirect instigated by the client-side javascript), sees
that the cookie it is looking for is set, and does the
appropriate redirecting (to the right sized page).
Pretty straightforward. mod_dir does this sort of thing all the
time, under the covers (although sans javascript, of course).
(darren)
--
You can't wake a person who is pretending to be asleep.
-- Navajo Proverb