The only way to do it in asp is
response.write(request.servervariables("http_ua_pixels")) |
But it's only supported in one browser that I know of.
Another alternative is to use javascript in an entry page and redirect to aother page or set some session variables/cookies based upon screen resolution
document.write("screen width=" + screen.width + "<br>");
document.write("screen height=" + screen.height + "<br>"); document.write("available screen width=" + screen.availwidth + "<br>");
document.write("available screen height=" + screen.availheight + "<br>"); |
That won't work if they have javascript disabled.
Screen resolution as a key to site design is bogus to begin with. What makes you think I use my browser full screen? You need to be concerned with the size of the browser's viewport, not the size of the screen it's displayed on.
You're much better off to go with a fluid solution and allow the user to view your site with using their preferences - not yours. You also don't have to maintain different sites for different screen resolutions.
EDIT: Went to your site using fire fox set to different sizes - 800x600, 1024x768, and 1600x1200. Looks good in all sizes although there's some horizontal scrolling needed in 800x600. Expands well to full screen 1600x1200.
Edited by dpyers - 31 December 2004 at 9:44am