AW: [Seaside] Browser Information
damien.cassou at laposte.net
Wed Aug 16 18:20:23 UTC 2006
Jason Johnson wrote:
> But since the web server is also a smalltalk object, he would have this
> information, right? Seems terribly inefficient to have to generate
> knows what it is talking to.
I'm not an expert, this is only what I think happens and you may want to
wait for a more precise answer.
- Theoretically, the webserver does not have to know the type of client
it talks to. The client ask for a page sending and url, and the
webserver answers a content. No need to know who is asking.
- In practice, here is what a navigator send to a webserver (extracted
from the variable request in HttpAdaptator>>beginConversation):
'connection'->'keep-alive' 'host'->'localhost:8080' 'keep-alive'->'300'
'user-agent'->'Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:18.104.22.168)
Gecko/20060731 Ubuntu/dapper-security Firefox/22.214.171.124'
What is important for us is the last two lines. You can see that the
user-agent is filled with information about the version, the operating
system and other things like this. This information can easily be used
in your application.
But the question of Ramon wasn't about browser but about screen
resolution. As you can see, this information is not in the request. The
webserver doesn't know it and your application can't know it too...
unless the browser sends it. And that is the solution I proposed when I
information. With the information on the client side, you need to send
it to the webserver and then, you will be able to access it from your
Hope it is clearer now
More information about the Seaside