InternetUnicodeHTMLCSSScalable Vector Graphics (SVG)Extensible Markup Language (xml)ASP.NetDocument Object Model (DOM)JavaScript ASP ObjectResponse Object Draft for Information Only
Content
Request Object
Request ObjectAnother function of Request object is the retrieving of HTTP client variables from the client. Request.Cookies CollectionRequest.Cookies Collection retrieves the the values of cookies which is sent in the HTTP request. Syntax:Request.Cookies(cookie)[(key)|.attribute] Or in an ASP file. Imply <% Request.Cookies(cookie)[(key)|.attribute] %> Parameters:cookie The parameter "cookie" is the name of the cookie in the Cookies collection to be retrieved. The data type of "cookie" is string and is enclosed by quotation marks (" "). key The optional parameter "key" is the name of the key of the parameter "cookie" to be retrieved. If the "key" is specifed, "cookie" is a dictionary and the retrieved is the value of the specified "key" from the dictionary "cookie The data type of "key" is string and is enclosed by quotation marks (" "). attribute The parameter "attribute" is the optional information of the parameter "cookie" with delimeter ".". The values of attribute is
Remarks:Cookies are transmitted as clear text in the HTTP header. Cookies are not suitable to store important data, such as login name and passwords. Besides, Cookies collection are only strings contained in an request headers. The values of Cookies collection can also be generated by any user. Therefore Cookie data in the HTTP header is not a secure way to identify a user. And header data or user input should be encoded or be validated before using. The Cookies Collection is indexed by the names of the parameter "cookies" and its parameter "key" in the request Header. With the Request.Cookies Collection, the value of cookie can be retrieved by name or key. The value of a cookie can be retrieved by its "cookie" name. The value of the "key" of a "cookie dictionary can be retrieved by including the parameter "key" to the parameter "cookie". For cookie without key, the Request.Cookies(cookie) will return the value of "cookie". For cookie with key, the Request.Cookies(cookie) will return as a single query string with all of the keys. If no cookie is specified, the Request.Cookies() will return as a single query string with the whole cookies collection. The parameter "attribute" with value "HasKeys" is used to determine whether the specified cookie is a cookie dictionary or a cookie with key. If two cookies of the same name are stored with different path attribute, for example. "/" and "/a", the HTTP request, "/a/ab/cookie.asp" will sent both cookies to the web server, but the Request.Cookiew would only returen the value with the deeper path structure, i.e. "/a" Since the multiple values of cookie dictionary or cookies collection is in the form of an collection, the values of the keys of a cookie dictionary or the values of the cookie elements of a cookies collection should be retrieved using a for each element loop in order to get the name of the element. Examples:
©sideway ID: 120200019 Last Updated: 2/7/2012 Revision: 0 Ref: References
Latest Updated Links
|
Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Reference 79 Computer Hardware 249 Software Application 213 Digitization 32 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 429 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019