This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
quickuser [2010/09/19 04:50]
Joel Dare
quickuser [2020/06/01 22:53] (current)
Line 1: Line 1:
 +====== QuickUser JavaScript Library ======
 +This library has been moved to [[https://​github.com/​codazoda/​quickuser|GitHub]].
 +<​del>​QuickUser is a JavaScript class that maintains user information. There are two versions, one that uses a cookie and another that uses HTML 5 local storage. Each creates a new user ID, if one wasn't already created, and stores an array of user information. Additional key / value pairs can be added by the programmer. No user id or password is required, making login unnecessary. ​ Login credentials could be easily added and tracked, however.
 +{{:​quickuser.zip|Download Cookie Version (quickuser.zip)}}
 +{{:​quickuser2.zip|Download HTML5 Version (quickuser2.zip)}}
 +In order to use the library, simply include the QuickUser.js file into your HTML document.
 +  <script type="​text/​javascript"​ src="​quickuser.js"></​script>​
 +Then, in your documents JavaScript create an instance of the QuickUser object.
 +<code js>
 +<script type="​text/​javascript">​
 +  // Load a user using the QuickUser class
 +  user = new QuickUser();​
 +  // Read the user ID that was assigned
 +  var id = user.get("​id"​);​
 +  // Read the number of hits
 +  var hits = user.get("​hits"​);​
 +  // Set your own variable
 +  user.set("​first",​ "​Joel"​);​
 +This source code is distributed under the [[MIT License]].</​del>​
comments powered by Disqus
quickuser.txt · Last modified: 2020/06/01 22:53 (external edit)