Page 1 of 1
Checking the client's screen resolution - is that possible?
Posted: Wed Aug 10, 2005 1:00 pm
by pilau
I'm working on different design versions of my new website - band website (you can take a look at
http://cryhavoc.owns.it) due to several design compatibilty issues, and I was thinking to myself if I could make a page, PHP or some other language, that would check for the user's screen resolution and then redirect to an appropriate page.
Is that possible?
Posted: Wed Aug 10, 2005 1:31 pm
by Roja
Yes it is possible, but its a *really* bad idea.
Almost every assumption you will make about users is going to be wrong. You want to know if they are at 1024, so you can fit x characters of text on the screen. However, in fact, they have a visual shortcoming, so their text is set 4x bigger so they can actually read what you put on the page.
You want to know if you can fit a certain amount of graphics up and down or across the page. However, because the user doesn't know enough to change things, their browser has 5 lines of plugins installed, reducing their screensize below what you expect.
Or they have bookmarks on the left. Or they have..
You get the idea yet? Its an infinite variety of combinations that boil down to one simple statement:
You cannot know what my screen will do.
Based on that, you should follow best practices in web development. Use flexible font sizes. Don't lock the resolution of the display. Use graphics that can stretch without distortion as background. Use percentage sizing rather than pixel sizing.
That way, whether its a power user with a 21" display at 1600, or a granny with a 14" display at 640x480, using superlarge fonts, they can read what you put on the site.
But if you still REALLY want to detect it, you'll need to use javascript, or a php library like
http://phpsniff.sourceforge.net
Posted: Wed Aug 10, 2005 2:16 pm
by pilau
Great. Real thanks.
I have neglected the idea, and did what you said - made my site design as changeable as I can without ruining it too much.
Finally, I made 3 versions of the design, one that is made for 800x600 reso, one that is made for 1024x768, and one for 1280x960 and larger resolutions.
Users can choose from those three to make up what suits them best.
Posted: Wed Aug 10, 2005 2:18 pm
by theda
Damn, mind doing that for my website?

Posted: Wed Aug 10, 2005 2:19 pm
by nielsene
Roja wrote:
That way, whether its a power user with a 21" display at 1600, or a granny with a 14" display at 640x480, using superlarge fonts, they can read what you put on the sitet
21" at 1600 is a power user?? That seems a few years old

Posted: Wed Aug 10, 2005 2:25 pm
by pilau
21" is big for a computer monitor.
Posted: Wed Aug 10, 2005 2:29 pm
by nielsene
Well that's the smallest of the ACDs...
Posted: Wed Aug 10, 2005 2:56 pm
by feyd
yeah.. 21 is pretty small to me.. I feel ultra cramped on this 17W. I find it challenging to functionally work on anything less than 1600.. multi-monitor or not.
Posted: Wed Aug 10, 2005 3:14 pm
by nielsene
Yeah I'm on a 30"ACD (2560x1600). And for some of my work I feel like I need a secondary 20" or larger. (Especially when doing videography or photo editting.) Programming is less demanding... multiple terminals, emacs windows and brwosers tile fine.
Posted: Wed Aug 10, 2005 3:17 pm
by pilau
Posted: Wed Aug 10, 2005 3:44 pm
by shiznatix
...is this not what CSS was made for???
Posted: Wed Aug 10, 2005 3:54 pm
by neophyte
Anybody beat two 24" screens side by side?

Posted: Wed Aug 10, 2005 3:58 pm
by pilau
I do! With a baseball bat!
Posted: Wed Aug 10, 2005 6:20 pm
by shoebappa
2 19" plus Monitors with Ultramon installed and I couldn't be too much happier. I was drooling over those 30" LCDs for a while but I can't live without being able to hotkey a window to another monitor... 2 30s I could live with : )
Back on topic, there were some good statements above, but I usually dislike variable width websites. I know it sounds all well and good but at 1600+ you end up having text lines that go on for years. I like shorter lines of text for readability and scanability... It's also difficult to make a variable width site look great. Prolly a matter of opinion, but I'd much preffer a fixed width site that would fit on the majority of screen resolutions. I still aim for 800x600 so around 760 pixels wide or so. Some people want things to fit vertically and that's probably a complete waste of time. Scrolling vertically is fine, horizontally should never happen.
Posted: Thu Aug 11, 2005 3:28 am
by pilau
shoebappa wrote:I still aim for 800x600 so around 760 pixels wide or so. Some people want things to fit vertically and that's probably a complete waste of time. Scrolling vertically is fine, horizontally should never happen.
Well said and well put.