There is no connection between the server and the client other than when a
request is made - so javascript would be the most appropriate way. There is
a server side class called the HttpBrowserCapabilities Class but it only
gathers the capabilities of the browser, not the screen the browser as a
client runs within. This would however allow you to check if the client
supports javascript, and thus send some javascript to gather the client
screen dimensions.
Right i know there is no permanent connection between client and web app but
there is at least one a every request..
The Context objects gathers a lot of client side data and i thought there
was some similar object for screen resolution.
There is no connection between the server and the client other than
when a request is made - so javascript would be the most appropriate
way. There is a server side class called the HttpBrowserCapabilities Class but it only gathers the capabilities of
the browser, not the screen the browser as a client runs within. This
would however allow you to check if the client supports javascript,
and thus send some javascript to gather the client screen dimensions.
And those browsercapabilities are based on what is *defined* for a particular
browser-string, NOT what this particular client actually *can* do:
* browser could be capable of javascript, but the user can have switched
that off -- not detected
* some browsers (Opera) allow user-defined browser-strings -- incorrect detection
* the list of capabilities per browser-string is out-of-date -- newer browsers
(Firefox) are not detected correctly (with the original browserCaps)
Not without a client script gathering the information first.
Take a look at the section on HTTP messages on the W3C web site. It will
give you a great understanding of exactly what's being passed between the
client and server.
check out
ftp://ftp.isi.edu/in-notes/rfc2616.txt
Section 4 - HTTP Message
and
Section 5 - Requests
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.