multi screen : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

multi screen

Multi screen does not mean having more than one monitor on your desk. It refers to the fact that people access websites from cellphone, hand held computers notebooks, laptops and desktops, in other words from a wide variety of screen sizes. This particularly import if your website is something people might access from cellphones, e.g. a restaurant guide, or a map. You need to either design your website to work well on all these sizes, or use different style sheets for different users, perhaps even trimming the content for users with small screens, or showing less at a time, requiring additional requests to see more.

The key to all this is the HTTP (Hypertext Transfer Protocol) meta header which can specify different stylesheets for different purposes e.g.

If you want to prune the content too, your server also needs to know the user’s screen resolution. Unfortunately, the HTTP header does not divulge it. You would have to ask the user and keep track on the server or with a cookie.

I suggest browsers embed a new meta tag in the HTTP header that looks like this:

<meta name="ScreenRes" content="1920x1200">

Maybe if one browser starts embedding it, the rest will follow suit.

If all your users are on a new browser, then the simplest solution is to use CSS3 media queries. This is purely client side. Your server has no idea of the screen resolution of any individual user. The server sends a large generic page that customises itself with style sheets. The problem is this large page may be unsuited for a small device, even with extensive CSS (Cascading Style Sheets) massaging. The nice thing about this approach is only the appropriate style sheet gets sent. The distressing thing about this approach is the giant content gets sent to small device over an expensive cellphone channel. Then it will likely ignore much of it. It would be better just to send the small device as much content as it can handle at a time.

Otherwise, run some JavaScript client side (in the head section) that gets the screen size in pixels with screen.width and screen.height and does what is needed to let the server know too. The catch is this will not work if the user has JavaScript disabled or simply does not have it.


This page is posted
on the web at:

http://mindprod.com/jgloss/multiscreen.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\multiscreen.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.22.27.253]
You are visitor number