• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get client;s screen resolution ?

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

Can you please help me to know the screen resolution of client's browser on server side ? i am using Struts 1.2.8, jsp 1.2 and servlet 2.3 specification. Please let me know. I have found ways using javascript, but wihtout using javacript, ...can the client's browser info be obtained from the http request header ?

Million thanks in advance
Omkar Patkar.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browsers don't send screen resolution in the HTTP request headers.
If your Javascript method is working, your best bet is probably to stick with it.

Knowing the client's resolution in a browser based app (as opposed to a WAP client, which does send the resolution in the HTTP headers) has limited value anyway. You have no way of knowing what size the browser window is on the user's desktop anyway. You also don't know how many toolbars they've got in their browser at any given time.
 
Acetylsalicylic acid is aspirin. This could be handy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic