Is querystring is faster to read than a cookie?
I am developing a web application and I am encrypting some XML and passing the result to a query string.
The question is: if I store the XML in a cookie instead of using the query string, would it be faster? 开发者_如何转开发My application is not slow, I am just wondering about the performance difference.
Thanks.
Absolutely no difference whatsoever. Both querystring and cookies are parsed from raw HTTP request into respective .NET objects for you and thus accessing cookie is no different than accessing a querystring value.
Both the cookie and query string are included in the request body, so neither will give you an advantage as you are, from the coding side, query collections in the Request body.
精彩评论