Detect user data and redirect without JavaScript

liunx

Guest
Is it possible to detect a users' screen resolution and generate a redirect without using JavaScript?<br />
<br />
Cheers, Jochem :cool:<!--content-->I don't think so. You can only view that information with client-side languags and Javascript would be the only way :(<!--content-->You are able to detect information about a user's computer using a server-side language, but I'm not sure about screen resolution info. The philosophy I use is to design for 800X600 (though this might be changing) and making sure that smaller screens can see entire page elements at once on the screen, even if they have to scroll over to see another element. I also try to have the layout expand automatically for resolutions higher than 800X600.<br />
<br />
A journalism professor brought up a great point that for some reason never dawned on me: people design pages vertically when computer screens are set up horizontally. I'm going to redesign my college paper's web site (again) and will design it for 1024X768, and have the front page content fit mostly in one screen height block. Individual page elements will still be viewable at 800X600 resolutions, but users will have to scroll to the side to see some of them. I don't have any mock-ups yet, it's just an idea, and yes I know I'm rocking the boat.<br />
<br />
But hey, somebody's gotta. We'll never know if the life preservers work until we fall overboard! :)<!--content-->I agree that normally a page should not need a redirect for any reason, but then of course there are the exceptions...<br />
<br />
Since I have no knowledge of SSI and such, would you mind posting an example of a script that would do a redirect depending on screen resolution?<br />
<br />
Cheers, Jochem :cool:<!--content-->You'd be better off posting in the PHP forum. Just ask them if there is a way to detect a remote machine's screen resolution on the server side.<br />
<br />
My bet is no, you can't. Just design your pages to look best at a certain screen resolution but still stay together if someone visits it with a smaller or larger resolution.<br />
<br />
The hardest thing to get used to in Web design is the fact that not everyone views the web from the same sized sheet of paper. Height and width matters, but if you want pixel perfect layouts across all screen resolutions, you'll be bald in two months. You've got to allow things to move around, even if only a little bit.<br />
<br />
Best advice any developer can give you.<!--content-->I perfectly agree on all of that. However, for those who want to stick to a fixed canvas size, I made a little test-page. Try it at <!-- w --><a class="postlink" href="http://www.alpinetrekking.com/canvas">www.alpinetrekking.com/canvas</a><!-- w -->. This may be usefull when your background image(s) should not resize, which is the case on my site <!-- w --><a class="postlink" href="http://www.alpinetrekking.com/test">www.alpinetrekking.com/test</a><!-- w -->. />
<br />
Anyhow, thanks for your advice.<br />
<br />
Cheers, Jochem :cool:<!--content-->
 
Back
Top