• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Unique identification of a client by web application

Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i'm developping a web application that needs uniquely identify clients that connect to it. Since clients can have a dynamic IPs, i can't use IPs as identifier. I would like to avoid to use cookies. Can you suggest me other ways to identify clients? Thanks to everyone.
Posts: 4179
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do the clients need to be identified the same way from one visit to the next (across multiple sessions)? Or just through the course of one visit to the site (in one session)?

If just in one session, then use the jsessionid to uniquely identify them. If you don't want to use cookies make sure you properly encode all URLs with the id. See this tutorial.

If you want to identify the same client over multiple visits, require them to log in with a username and password. Then store some unique id in your database. The first time the user visits your site, you can generate thid using the Java class java.util.UUID or usually your DB can generate one as well. When the user successfully logs in you pull that ID out of the database and put it in the client's session.
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic