Get user screen size in

How do I find users screen size using but without using JavaScripts or third party utility?

I need to find screen width and height so that I can present users with different content.

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

dorwardConnect With a Mentor Commented:
You can't.

By default the browser doesn't send details about the users resolution to servers. The only way to find it out is to run JavaScript (or another client side technology) on the client and then have the user follow a link with the information GET encoded or to submit a form.

I suggest rather then screensniffing.
tncbbthositgConnect With a Mentor Commented:
If you want the screen size, you'll have to create an asp page that asks for the height and width and redirect to it.

What you will have is one page which's javascript looks like so:

  <script type="text/javascript">
   funcion redirect(){
    top.location.replace("" + screen.height + "&width=" + screen.width);
 <body onload="redirect()">

then in your asp, retrieve the width and height as if it was in a form.

Hope this helps,
recommendation: Split
All Courses

From novice to tech pro — start learning today.