function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tom_CRtom_CR 

User is logged in or not | Web Messenger

Hi All,

 

We are creating web messenger in Salesforce using HTML, JavaScript, S-Control and Ajax.

 

Can one tell us how can we know the following?  

  1. User is logged in or not
  2. User is accessing our application.

Thanks in Advance

 

Regards

Tom

werewolfwerewolf
User is logged in or not

You can check for the existence of a cookie called "sid" in the *.salesforce.com domain.  This will tell you if a user has logged in, although it won't tell you whether that login has timed out.  So the login may or may not be valid.

User is accessing our application.

I would think you would know whether the user is accessing your application or not.  It is, after all, your application.