Friday, May 7, 2010

Session Timeout in SharePoint

Since long I have a question that how can I implement a session time out in SharePoint sites. But i never explore as there is no such requirement in any of my project till now.

Suddenly the requirement came and we have to suggest a way to do that with the minimal efforts. And after searching on google i found this and this..., though still we haven't implemented it :(

I am giving you the easiest way directly here to implement that, edit your master page and add the below script in javascript block.

function MySiteTimeOut()
{setTimeout("SessionTimeOut()", 300000);}

function SessionTimeOut()
{document.execCommand("ClearAuthenticationCache");}

This is the same function called when you click on Sign-out in SharePoint site.



No comments: