www.webdeveloper.com
Results 1 to 4 of 4

Thread: Complicated website development help/question

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Complicated website development help/question

    So I've been working on this website which is an ongoing choose-your-own-adventure story that I update regularly. There are so many parts to the story now that I need a way for my readers to be able to get back to whichever post or part of the story they've gotten up to but I can't seem to find an answer. I feel like I should be able to have cookies track the last place they read, but I haven't found anything that fits that exact nature. Anyone know about this/have suggestions?

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,125
    You should require your users to have an account. You could then store this type of information in a database. When they log in, you'll know who it is, and where they are at.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    So the only piece of information that you need to store is the virtual equivalent of a page number - no need to store any details of things like, for example, equipment that the character possesses or hit points, etc? If that is the case, this should be quite trivial - all you need to do is set a cookie with a unique name, a value of the stage that the character is at, with a *reasonable* expiry date - I'd suggest around a couple of weeks tops. (If somebody hasn't revisited the site after two weeks probably safe to say that they've lost interest.)

    Have a read of the documentation on setting cookies with JavaScript on the Mozilla Developer Network: https://developer.mozilla.org/en-US/...ocument.cookie & https://developer.mozilla.org/en-US/...ippets/Cookies - unfortunately the API is quite primitive and doesn't include any methods, but given that what you're trying to do is quite simple - in the scheme of things - this shouldn't be too much of a problem.

    If you'd rather do it through a JavaScript library, there are some available. A cursory search of Google turned up these:
    http://pablotron.org/software/easy_cookie/
    http://code.google.com/p/cookies/
    Doubtless others are available. I can't vouch for any of them as I haven't used them.
    Hope this helps.
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  4. #4
    Join Date
    Nov 2012
    Posts
    2
    Thank you so much for the help guys! I'm going to look into this stuff now and let you know how it works out.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles