ASP discriminant resolution of client screens

Source: Internet
Author: User
Resolution | client

In the Web development process, we often need to understand some of the client's display features to better prepare the application, in which the screen resolution of the client computer is a very important issue, because the resolution is not correct, we may be scheduled to display a disorderly seven or eight of the page, now good, You can use ASP to determine the resolution of the user's screen and to guide the appropriate page.

Please take a look at this small program below.

Determine the client's screen resolution primarily using Http_ua_pixels this server variable.

* Determine the client resolution.

<% @language = "VBScript"%>
<%
Select Case Request.ServerVariables ("Http_ua_pixels")
Case "800x600."
Response.Redirect "800.htm"
Case "640x480"
Response.Redirect "640.htm"
Case "1024x768"
Response.Redirect "1024.htm"
End Select
%>

What, is it simple? There is no longer a need to worry about not knowing the client's resolution.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.