Difference between viewstate, cache, session

Answer Posted / chinmayee mishra

SESSION: Variables are stored on the server, can hold any
type of data including references, they are similar to
global variables in a windows application and use HTTP
cookies to store a key with which to locate user's session
variables.

VIEWSTATE: Variables are stored in the browser (not as
cookies) but in a hidden field in the browser. Also
Viewstate can hold only string data or serializable objects.


CACHE: It refers to information that is reused in your
application, or information that is stored on your computer
so it can be reused. For example, if you download an image
from the internet, it's often cached so you can view it
again without downloading the image data. Caching is a form
of replication in which information learned during a
previous transaction is used to process later transactions.

To make web surfing faster, web browsers store recently
visited pages on the user’s disk. When the site is
revisited, the browser displays pages from the cache
instead of requesting them from the server. Reloading
brings up the current page from the server.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the parent class of the web server control?

759


Where session variables are stored?

720


Explain the advantages of passport authentication.

669


Explain how cookies work.

778


Why we go for mvc instead of asp.net? : Asp.Net MVC

696


What is difference between viewstate and session state in javascript?

811


How does the service stream content?

763


What are the namespaces used in asp.net mvc? : asp.net mvc

711


Do gac'ed assemblies have fulltrust?

833


What is difference between asp.net and asp.net mvc? : Asp.Net MVC

675


Where would you use an ihttpmodule, and what are the limitations if any?

724


How can you handle unmanaged code exceptions in asp.net?

739


How many types of cookies are there in asp.net?

709


What is difference between Fragment Caching and Page Caching in ASP.NET?

775


What does aspcompat="true" mean?

742