Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
How does the cookies work in asp.net?
Profile Answers by cyus_sg Questions by cyus_sg
Questions by cyus_sg
Editorial / Best Answer
Prabhat ChauhanProfile Answers by Prabhat Chauhan Questions by Prabhat Chauhan
we know Http is an state-less protocol which is required for interaction between clinet and server .
so there is an need to remeber state of request raised by an web browser so that
web server can recognize you have already previously visited or not.
There are two types of state management techniques:
a) Client side state management
b) Server - side statemanagement
Using cookies comes under clinet side statemanagement .In HttpResponse we write
Cookie containing sessionId and other information within it.
when a browser made a request to the web server the same cookie is sent to the server where server recognize the session id and get other information stored to it previously.
Cons:
1)Cookie should contain non sensitive data as one can easily read cookies and they result of which your security may be tampered .
2) Cookie should not contain large amount of information as they are sent back and forth with request and response in between client and server which may cause your
Performance degradation
Related Answered Questions
Related Open Questions