Page 1 of 1
Really new... question about variables
Posted: Sun Feb 27, 2005 12:59 pm
by clayton
Hi
I am just starting to play around with PHP and have a question.
I know the variable for detecting the users browser, but I am having trouble finding what variable to use to detect the screen resolution.
Can anyone help me out?
Thanks
Clay
Posted: Sun Feb 27, 2005 1:00 pm
by feyd
there is none.
Javascript can do that.
Posted: Sun Feb 27, 2005 1:08 pm
by clayton
Thanks for your reply,
So can php work with an if statement and java, what I was wondering if I am able to do is detect the resolution settings and in turn insert the appropriate image to maximize the optimize the display size
Maybe this is a stupid question.
Clay
Posted: Sun Feb 27, 2005 1:09 pm
by John Cartwright
if you have a well planned and thought out design, you shouldnt have to worry about resolution

Posted: Sun Feb 27, 2005 1:11 pm
by feyd
you can have Javascript send the information via a client-side redirect or form submission.. however, do not rely on Javascript being on.
Posted: Sun Feb 27, 2005 1:16 pm
by clayton
Forgive my lack of experience, but why would a designer or developer not want to optimize the website to take full advantage of the users screen size. For example if you originally program a website to display at full screen in 800x600 resolution when a user viewing it in say 1024x768 they will see the site as ruffly 2/3 of their screen. I know you can adjust the settings to increase the width in html but it would be better for image display if you could substitute the appropriate image (for size) to maximize the asthetics of the site.
Again, I am extremely new to this so please don't take offense to my ignorance.
Thanks for the feedback,
Clay
Posted: Sun Feb 27, 2005 4:30 pm
by smpdawg
I think the idea is that some areas of the screen, by their very nature, do not need to change size. A menu block or side bars for example would remain the same size regardless of resolution. Now areas that contain content should scale to fit what is left of the screen.
Coding for specific resolutions isn't necessarily a virtue for informational sites because the viewer would probably like to see as much as they can on the screen without having to scroll around. Sites like this one, Wikipedia, etc. are nice because they are created to take advantage of all the width that the user has available.
Sites like Yahoo! keep the size the same so the site appears uniform to everyone and also ensures that it looks the way the content providers expected.
The only time that resolution dependence makes sense is for sites that are more art and eye candy than actual content.
A long time ago (around 1996 or 1997) I used to care about knowing the resolution of the viewer and make custom output. Now I either fill the screen entirely or if I impose a fixed width, I go for the LCD (lowest common denominator) within reason. I don't care about someone running 640x480.
You may want to read this blog.
http://blog.eyetools.net/