This is one of the most famous methods and the one used by almost all professional
sites. This allows you complete flexibility and whatever you want as far as session
tracking is concerned. But it is not as easy as the other 2 methods. Besides some
applications may not allow cookies in which case you have to revert back to the
other 2 methods. I had designed websites using WML (Wireless Markup Language)
which worked on WAP based cell phones. Unfortunately the cellphones did not have
enough memory to support cookies, so I had to use hidden fields to get session
tracking working. But cookies would work on almost every every computer, except
when a user may have blocked all cookies for security reasons in which case you
would once again have to use either of the other 2 methods.
There will be no code here to explain cookie usage. Using cookies is probably
the best and the neatest of all the methods to maintain sessions. Cookies are
basically small text files that are stored on the user's computers. This has information
pertaining to that user. Once the cookie is created on the user's computer then
for every further request made by that user in that session, the cookie is sent
along with the request. The value of every cookie is unique (for users browsing
a particular website), so the server side program can differentiate between various
users.
The method to program cookies is different for different languages. Most of the
language provide some class that covers all the details of cookie creation and
maintenance. For example in Java you have a javax.servlet.http.Cookie
class
that is used to work with cookies. Since I have decided to keep this article language
neutral and I had not planned to discuss cookies in depth I would not go into
the details of cookie programming.
Implementing Session Tracking
Cookies
You might also like...
Java books
-
Dynamic Web Application Development with ASP.Net (Computing)
This is the latest book from Cengage Learning on "Dynamic Web Application Development with ASP.NET...
Java forum discussion
-
Which is harder to learn Java or C++ ?
by surbhinahta (114 replies)
-
C ++ public int __cdecl printf (const char * __restrict__ _Format, ...) problem.
by sgameyta (0 replies)
-
What do you need to build a simulation software?
by ilenia.news (0 replies)
-
Taking a New Path
by samu13813 (0 replies)
-
What is Mhapks? how to open edit or modify APK files?
by eeshasajawal2004 (0 replies)
Java podcasts
-
Hanselminutes: Startup Series: Buying an Existing Small Company or Online Application
Published 8 years ago, running time 0h34m
Scott talks to Rob Walling about how he purchases small niche products and companies online and revitalizes them. He recently purchased an existing product that consisted of a 300 gig database and tens of thousands of lines of Classic ASP. How did he know it was valuable? What's next?
Comments