ASP 3.0 advanced programming (1)

Source: Internet
Author: User
Tags html page session id relative
Processing of ASP 3.0 requests and responses
These two objects are the two most commonly used built-in objects provided by ASP. Between a browser (or other user agent) and a Web server, information exchange in requests and responses can be accessed and managed through two built-in objects in ASP, these two objects are called Request and Response objects.
Almost all the work on the ASP page needs to access these two objects. Using these two objects will affect the efficiency and reliability of the page. Of course, their main purpose is to access the value that the user sends back to the server, that is, to obtain from the <FORM> segment of the HTML page or to the end of the URL as a query string, and create appropriate outputs to return to the user, and they can share many of the same factors. For example, both objects can use cookies stored on the client computer.
Therefore, we divide the content into two separate parts (each object part), and first start with the information exchange between the client and the server, and then study each object.
The research content is:
· How the client communicates with the server to transmit Web or other resources.
· Details of the Request and Response objects and their commonalities.
· How to access the corresponding value through a form and query string.
· How to read or create cookies and store them on the client's computer.
· What are the server variables? How to access and modify the HTTP header.
· Describes changes to other related items, such as the use of the customer's certificate.
Communication between the client and the server
To save space, use the word "browser" in the following content. However, you must remember that applications that can access web pages are not only browsers, but many special applications download web pages from websites, for example, special client programs designed for users with impaired vision or other users who have difficulty using a common browser. The most obvious example is the robot that the search engine uses to access websites on the Web. All these factors are taken into account, including common Web browsers. The correct word should be the user agent ).
Page request dialog
When a browser sends a page request to a Web site, it must clearly tell the server which page the browser is requesting. First, you need to establish a connection with the server through the domain name, and then provide the full path and name of the requested page. Why is full path and name required? Web is a borderless environment, so you must create a session id for each customer (I will introduce how ASP can do this later ).
This means that every time the server sends a page to the customer, the server will completely forget the customer. Therefore, when a customer requests the next page, it is exactly the same as a new visitor. The server cannot remember this customer, so it cannot determine which page they requested last time. This is because you cannot use relative paths to provide a page, even if the page contains a relative link. For example:
<A href = "Download. asp"> Next Page </A>
Related Article

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.