One solution would be to put the javascript in its own .js file, and have every
page on your site reference that js file. Now every page will send a cookie with
the resolution information. You may want to adjust the server-side processing to
avoid duplicate database work, but that shouldn't be a big issue.

Wes




"Philip M. Gollucci" <[EMAIL PROTECTED]>
on 03/27/2002 05:40:47 AM

To:   darren chamberlain <[EMAIL PROTECTED]>
cc:   [EMAIL PROTECTED] (bcc: Wesley
      Sheldahl/Lex/Lexmark)
Subject:  Re: Apache+Modperl & Website Statistics


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.

END
------------------------------------------------------------------------------
Philip M. Gollucci (p6m7g8) [EMAIL PROTECTED] 301.314.3118

<snip>


On Wed, 27 Mar 2002, darren chamberlain wrote:

> * Philip M. Gollucci <[EMAIL PROTECTED]> [2002-03-27 09:59]:
> > I know perl is server side and javascript is client side.
> > AFAIK, getting the resolution is a client side thing.  I know I
> > can embed an html page with javascript in it that redirects to
> > a perl file setting the query string with width=1024;height=768
>
> [-- snip --]
>
> > But, I need to find someway to do this without the extra
> > redirect.
>
> Since, as you already realize, there is no way to get the client
> information from the server size, I think the best you can do
> would be something along the lines of: have a javascript
> enabled page that gets the height and width of the client (as
> you've shown), that then redirects the client to a location
> that can read the height and width from the query string and set
> a session cookie, which can then be read and acted upon for every
> subsequent request by a PerlTransHandler or RewriteRule.
>
> Does that sound reasonable?
>
> (darren)
>

<snip>



Reply via email to