2 Replies - 722 Views - Last Post: 19 February 2013 - 12:29 AM

#1 Anthonidas  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 218
  • Joined: 25-April 11

registering users in a websocket chat system

Posted 11 February 2013 - 04:39 PM

Hey guys

I'm playing around with websockets, so I decided to create a simple chat, to go further in this relatively new technology. After some long programming, (I was already happy about my work) I realised that I had forgotten to implement something very important!

At the moment it works like that: when a user connects to the page he is aked for a nickname. This nickname is stored in a array with it's custom color, and some other nice things, but if the user refreshes the page, obviously, he is asked again for a new nick. :stupid: :lol:

How vould you handle that? Would you create cookies to store the users nickname or would you save the user's IP, or is there any other possibility, any sort of UID that can be used?

(I don't want to use any database at the moment, i would just like to do it as simple as possible)

Is This A Good Question/Topic? 0
  • +

Replies To: registering users in a websocket chat system

#2 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: registering users in a websocket chat system

Posted 14 February 2013 - 06:27 AM

If you don't want to use a database then I'd assume cookies/local storage would work best?
Was This Post Helpful? 1
  • +
  • -

#3 Anthonidas  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 218
  • Joined: 25-April 11

Re: registering users in a websocket chat system

Posted 19 February 2013 - 12:29 AM

Ok thank you for your reply.

In fact at the moment I do not know how to implement any DB, so I wanted to start without. Meanwhile I changed my mind and think it would be better to use one... but I'll do some research on google before I ask stupid questions ;)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1