+ Start a Discussion
RavikRavik 

logout issue

Hi

We have implemented logout functioanlity by adding script "/secur/logout.jsp" to visualforce page for force.com sites. But whenever we logout, it is going to Sales force logout page and then going to login page. As per requirement we dont want to show sales force logout page. please let me is there any java script or other scipt to change the behavior.

 

Thanks,

Ravikumar Katragunta

Ankit AroraAnkit Arora

I guess you are challenging native behavior of salesforce.

 

 

Thanks
Ankit Arora

 

EIE50EIE50

Hi Ravi,

 

All you have to do is, use "your required url" instead of "/secur/logout.jsp" in your visualforce page in your logout paramater. Let me know if this is what you are looking for?

 

Thanks.

Shashikant SharmaShashikant Sharma

Go to partner settings and set logout url there.

WasulaIsBackWasulaIsBack

I had the same problem but wasn't worried about it too much.  I couldn't find anything settings within SFDC that would prevent that intermittent page so I wrote some javascript to do it.  It's a little clunky, but it will solve your immediate problem.

 

Replace the logout link you are using now with the a href tag.  When a user clicks logout, a window will popup real quick then disappear and then they will be redirected to whatever URL you set in the location.href.

 

I think a hidden iframe on another page would probably be better than the pop-up but this does work.

 

<script type="text/javascript">
function logout()
{
    popup = window.open("{!$Site.Prefix}/secur/logout.jsp", "popup", "status=1,width=0,height=0");
     popup.close();
     window.location.href="http://www.yoursite.com/"
    
}
</script>
    <body>
    <a href="" onclick="return logout()">Logout</a>

</body>

 

Steve Wasula

WasulaIsBackWasulaIsBack

Found a better solution...

 

  1. Create a new VF page called logout
  2. Change the logout link to point to the new page with the following code

<apex:page showheader="false">
<head>
<meta http-equiv="Refresh" content="1, URL=http://www.yoursite.com" />
</head>
<body>
<iframe src="{!$Site.Prefix}/secur/logout.jsp" width="100%" height="0"></iframe>
Logging Out ....
</body>
</apex:page>

 

The logout page will display for 1 second and then redirect the logged out user to whatever page you want.  It also doesn't require javascript.

 

Hope this helps,

 

Steve

Rajkumar VenkatRajkumar Venkat

its solves the issue.. thanks

Satyendra RawatSatyendra Rawat
Hi,
          
            <meta http-equiv="Refresh" content="1, URL=http://www.yoursite.com" /> 
            
           Above line is not working in Internet Explorer, Below Line is the FIX for all browsers :
 
<meta http-equiv="refresh" content="0;URL=http://www.yoursite.com" />


Satya


Meenu AroraMeenu Arora
This page is redirecting to logout1 page only. 

please let me know where and how i can override the /secur/logout.jsp. As far as I know, we dont have default site.logout() method provided by salesforce. 

I am trying to override the logout functionality for standard salesforce and not for any curstomer portal. Please assist urgently.