Redirection after Clearing Session in SharePoint Environment

 
When you perform signout operation from sharepont environment ,  it automatically clears session for the pariticular logged in user. This is the page located in “_layouts/signout.aspx” page. In this blog, I will try to explain how to redirect to your start.axpx instead of closing the window on sign out.
 
 
If you see the signout.aspx page using SPD 2010, you can find the following lines of code using "Clear Authentication Cache"
 
function _spBodyOnLoad()
{
try
{
document.execCommand("ClearAuthenticationCache");
}
catch (e) { }
 
window.close();

}
Just replace the following close() code with
 
function _spBodyOnLoad()
{
try
{
document.execCommand("ClearAuthenticationCache");
}
catch (e) { }

window.location("/start.aspx");
}

 
That's it. Now it will redirect to start page once you sign out of the sharepoint environment. 
 
Happy SharePointing :-) 
 
 
 
Ebook Download
View all
Learn
View all