Tell me more ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have a basic question about Salesforce session: How can I logout my users automatically when they close the browser window?

share|improve this question
I don't know of a way to do it with native pages. The only work around I can think of would be to make the timeout value really short (15 minutes). This of course adds a usability problem for your users if they leave a session inactive. – Daniel Hoechst Dec 12 '12 at 15:26
What if the user opens multiple tabs/windows? Do you log them out if they close just one of the tabs/windows? Is there any reliable way to know when they've closed all tabs/windows? Why do you want to log them out automatically? – tomlogic Dec 13 '12 at 6:25

2 Answers

Well, to log a user out you redirect them to /secur/logout.jsp ... however enforcing that mechanism would either have to be done via JavaScript or in theory you could also use a Browser Extension

share|improve this answer

I think if we talk about custom pages then by using JS this may be possible (that also need POC), but other than that it is quite impossible to do this with all native pages (home page component can help?).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.