Showing posts with label cookies. Show all posts
Showing posts with label cookies. Show all posts

Thursday, 15 November 2012

jQuery: cookies!

   


I've already talked about cookies. We explored the way to use them with ASP, but have you ever wondered how to manage them with jQuery?

This is a very short article because I don't want re-write an already made guide...
We are talking about a jQuery plug-in called jquery-cookie which allows us to manage everything about cookies with jQuery.
We will be able to read, create and delete cookie sessions. The plug-in can manage session expiration and it can be configured in order to define a valid path for cookies.

Just go to the above page and see for yourself...

Monday, 4 July 2011

ASP: the session object (vs cookies)

   


I've been talking about cookies some time ago, however you should know there's another way of storing information if you use ASP: the session object. There's a big difference between cookies and sessions: cookies are client-side, while sessions are server-side. When we open an ASP page, the server creates an unique identifier that will determine the session id. While cookies can have a long expiration time, usually sessions have a predetermined timeout (20 minutes). Cookies are completely controlled by the code of the page and can be created, changed and destroyed using appropriate commands - as we saw in the aforementioned article. That is true for sessions as well, however the session unique identifier is always created when an ASP page is opened. By default, when an ASP request is made to the server, the session is automatically started and the unique identifier is stored for future use. The session ends after 20 minutes by default (it's possible to change that value programmatically or in IIS).

Wednesday, 29 September 2010

ASP: Do you like cookies?

   


People don't like cookies, antivirus and anti spyware applications hate tracking cookies, everybody is scared to death by cookies. In the end they are just cookies... maybe poisoned cookies, maybe just valuable in some situations. If you're dealing with local web applications, you might find the use of cookies quite interesting, especially when you need to store temporary information such as log-in user name or date stamp.