ssjs_generateClientID()
NES3+Syntax
ssjs_generateClientID()
Description
The ssjs_generateClientID function is a top-level function that is not associated with any core server-side object. This function returns a unique identifier from the runtime engine. This allows you to track a user's session across several pages when using client-side maintenance. You may want to store the identifier as a property of the client object, but be careful to keep it from being accessed from other clients.
Example
Listing 8.139 shows how you can assign a property of the client object an identifier to track a user.
Listing 8.139 Using the ssjs_generateClientID Function
<SERVER> // Store the identifier in a client property client.sessionID = ssjs_generateClientID(); ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.