Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen size using ASP

Status
Not open for further replies.

MoaD

Programmer
Apr 17, 2002
17
CA
Is there a way using purly ASP to determine a users screen size. I don't want to use any third party scripts etc... and I don't want to use javascript Im just want to know if ASP can handle this and how if possible
Thanks in advance
 
ASP is server-side script, this means that it doesn not know anything about the client browser except what the client browser sends it. Basically if it is not in the ServerVariables collection, the server doesn't know it.
What you can do is use client-side scripting to capture these values and then submit them back to the server and let the server stroe them in either cookies, or session variables, or something like that. But without client-side scripting you can't get that information.

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Thanks Tarwn

I know what ASP is i just wasnt sure if there was an built in ASP object that i didn't know about to handle my query

 
Sorry Tarwn my last response wasn't meant to come off like im a snot i really do appreciate your time and answer :D
 
I had to double check to be sure, but the browscap dll basically takes the http header information from a web page request and then compares it against entries in a text file (browscap.ini). This allows you to have a reasonable guess as to what the client can support, but does not actually contact the client to find out what they do support. In other words someone connecting to your web page with IE6 will check off as having javascript support, but there is no way of telling (without going to the client) whether they have turned it off or not.

You will need to find a private copy of the browscap.ini file as they are not kept up to date by MS and generally since no two copies are alike you should be careful where you get it from. You could also look into browserhawk which has components to do all the work for you and actually figure out what the user has support for, screen resolution, etc.

On the upside, if anyone hits your site with one of the newer handhelds sporting the latest windows platform for handhelds, they generally transmit their screen resolution right in the http header, which is extremely handy.

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top