Difference Application,session,cookie,viewstate and Cache

Source: Internet
Author: User

The original Published time: 2009-08-01--from my Baidu article [imported by moving tools]

In ASP. NET, there are many kinds of objects that hold information. For example: Application,session,cookie,viewstate and cache, so what's the difference? What is the environment that each object applies to?

To get a clearer picture, we summarize the specific context in which each object is applied, as shown in the following table: Method information Size save time apply range save location application any size entire application lifetime All users server Session small, simple data

User activity time + a delay time (general

is 20 minutes)

A single user server-side Cookie small amount, simple data can be set as needed for a single user client Viewstate small, simple data a Web page lifetime of a single user client Cache any size can be set on demand for all user server-side hidden domain small, simple Single Data A Web page Lifetime single User client query string small, simple data until the next page jump request a single User client Web. config file unchanged or minimal change in small amounts of data until the profile is updated by a single user server side

Difference Application,session,cookie,viewstate and Cache

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.