the value returned in the ServerVariables collection contains the details of the Web server and the path information for the current page. You can use this information to create a page anywhere. For example, to create a "self reference" page, this page can call itself to complete another task, we can use the following code:
2. Create a complete URL that includes the port number (in this case, not the standard value 80):
Strfullurl = "http://" & Request.ServerVariables ("Local_addr") _
& ":" & Request.ServerVariables ("Server_port") _
& Request.ServerVariables ("Path_info")
3. Use the "Http_user_agent" value in the ServerVariables collection to obtain a user agent string that can be used to determine the browser and version of the visitor:
Response.Write "User Agent string is <b>" & Strua & "</B>"
4. Detecting the language of the browser
Another useful value in the ServerVariables collection is "Http_accept_language", which contains a language code that is specified when the browser is installed, or hard-coded into the user's regional version. Examples of language codes are en-US (UK, USA), De-at (Germany, Australia) and ES-PE (Spain, Peru).
Note ASP does not fill in the ServerVariables collection until you access one of the members. Accessing one member of the collection for the first time will give IIS all of it and use the ServerVariables collection only when needed.
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.