in reply to Re: browser metrics
in thread browser metrics

ahmad: this looks VERY close, but does this create the perl variable first then is used by js, or is the variable created b js then is used in perl? what i'm trying to do is gather the clients browser specs, then use them in layout proportions in my webpage (written 99% perl) when i decide the banner width, how much to display on the webpage, etc depending on where the browser settings are when the client connects to the webpage. i sort of do it now, but i cant get the specs available to me in perl so i can adjust the banner width, for instance. any more explanation would be gratefull, thanx. !-- Node text goes above. Div tags should contain sig only -->

you mean there's any easier way?

Replies are listed 'Best First'.
Re^3: browser metrics
by ikegami (Patriarch) on Aug 16, 2010 at 06:53 UTC

    is there a way in perl to read the clients browser/screen metrics

    The client does not normally send that data. Solutions will involve running a program on the client that causes the client to send that data to a Perl script.

    does this create the perl variable first then is used by js, or is the variable created b js then is used in perl?

    The concept of variables being shared across languages, processes and machines makes no sense.

    As for the flow, HTTP requests are always initiated by the client. If you want to pass the browser information to a Perl script on the server, you'd need to make two requests: one that gets the JS to execute, and one that has the browser information.