[Seaside] Browser Information

Boris Popov boris at deepcovelabs.com
Wed Aug 16 18:40:37 UTC 2006


Indeed, nowhere will you find screen resolution in there, but user agent is
actually used quite a bit in real world even though its not a mandatory
regulated field. That's not to say I would recommend relying on it, but its
available should you need that knowledge for whatever reason
(http://en.wikipedia.org/wiki/User_agent).

Back to resolution issue, you should be able to use scriptaculous to place
an async request on the home page that sends back,

screen.width+'@'+screen.height

to a callback, which you can then use to set the resolution on your session
and refer to it from there on in. I'll see if I can find a few minutes to
try to provide a working example.

Cheers!

-Boris

-- 
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Philippe
Marschall
Sent: Wednesday, August 16, 2006 11:21 AM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: Re: [Seaside] Browser Information

Yeah, but this is totally unspecified (or no browser follows the
specification), not reliable and bad practice. Additionally it doesn't
provide the screen resolution as initially asked.

Philippe

2006/8/16, Boris Popov <boris at deepcovelabs.com>:
> self session currentRequest headerAt: 'user-agent'
>
> Hope this helps,
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
>
> boris at deepcovelabs.com
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Jason
> Johnson
> Sent: Wednesday, August 16, 2006 10:57 AM
> To: 'The Squeak Enterprise Aubergines Server - general discussion.'
> Subject: AW: [Seaside] Browser Information
>
> But since the web server is also a smalltalk object, he would have this
> information, right?  Seems terribly inefficient to have to generate
> javascript to find out the browser when the smalltalk system already
> knows what it is talking to.
>
> -----Ursprüngliche Nachricht-----
> Von: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] Im Auftrag von
> Damien Cassou
> Gesendet: Dienstag, 15. August 2006 17:39
> An: The Squeak Enterprise Aubergines Server - general discussion.
> Betreff: Re: [Seaside] Browser Information
>
> Ramon Leon wrote:
> > Hi, wondering if anyone knows how to get at browser info from within
> > Seaside?  In .Net the web server captures a bunch of information in
> > Server.ServerVariables dictionary, most of that stuff I can find in
> > HttpRequest, I can find the referrer, user-agent, and host, but I need
>
> > the screen resolution.  I need to deliver a different css stylesheet
> > depending on the users screen resolution and can't seem to find
> anything
> > that'll work.
>
> I don't think navigators return this by default. You might want to ask
> using javascript... just a clue, sorry
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3370 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060816/1c4c8509/smime.bin


More information about the Seaside mailing list