HTML页面提交处理原理
2008-05-13 18:03
281 查看
HTTP请求 请求行HTTP方法、版本号:GET/Testpage.html HTTP/1.1 HTTP报头 Accept:*/*Accept-Language:CnConnection:Host:Referer:User-Agent:HTTP主体 (所有被发送到服务器的数据,例如用户输入到HTML表单中的数据。) HTTP响应响应行HTTP版本号、发送请求成功与否的HTTP状态码:HTTP/1.1 200 OK HTTP报头 Date:Server:Last-Modified: HTTP主体(待客户端浏览器执行的HTML代码和脚本) 2. 表单Formaction:指定接受表单数据的web页 action="safasf.aspx"method:指定传送表单数据的HTTP方法 method:GET或POST9.3 GET The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process. The semantics of the GET method change to a "conditional GET" if the request message includes an If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. A conditional GET method requests that the entity be transferred only under the circumstances described by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network usage by allowing cached entities to be refreshed without requiring multiple requests or transferring data already held by the client. The semantics of the GET method change to a "partial GET" if the request message includes a Range header field. A partial GET requests that only part of the entity be transferred, as described in section 14.36. The partial GET method is intended to reduce unnecessary network usage by allowing partially-retrieved entities to be completed without transferring data already held by the client. The response to a GET request is cachable if and only if it meets the requirements for HTTP caching described in section 13. 9.5 POST The POST method is used to request that the destination server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions: o Annotation of existing resources; o Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; o Providing a block of data, such as the result of submitting a form, to a data-handling process; o Extending a database through an append operation. The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a database. The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on whether or not the response includes an entity that describes the result. If a resource has been created on the origin server, the response SHOULD be 201 (Created) and contain an entity which describes the status of the request and refers to the new resource, and a Location header (see section 14.30). Responses to this method are not cachable, unless the response includes appropriate Cache-Control or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent to retrieve a cachable resource. POST requests must obey the message transmission requirements set out in section 8.2.
相关文章推荐
- HTML页面提交处理原理
- html 提交表单,但不跳转页面处理返回值
- html中提交表单并实现不跳转页面处理返回值
- html中提交表单并实现不跳转页面处理返回值
- JQuery -AJAX- html中提交表单并实现不跳转页面处理返回值
- html静态文件提交到aspx页面处理
- html页面,弹窗(原始的alert(),jquery的alertWin),原理是什么?
- 静态HTML页面处理参数
- php生成html静态页面缓存技术原理【附实例】
- python处理HTML与XML之获取页面图片地址
- 秋色园QBlog技术原理解析:Web之页面处理-内容填充(八)
- asp.net 处理F5刷新页面重复提交页面的一个思路
- html页面转向jsp页面后页面样式变化处理方法
- HtmlAgilityPack 抓取页面的乱码处理
- 秋色园QBlog技术原理解析:页面Post提交机制(十一)
- 在同一页面处理提交代码
- 在html页面提交值到动态页面时出现中文值为乱码的解决方案
- 点击不同的按钮把同一个表单提交到不同的页面处理的方法
- HtmlAgilityPack 抓取页面的乱码处理