Detecting Session Expiry in CAF


In CAF when a user’s session expires none of the commands work.

Is it possible with js in CAF to check if the user’s session has expired?

if ()
//raise url to force login page
//invoke command etc

I am aware that MWS detects the session has expired and displays the Growler to prompt the user to login again - which takes the user to the login page. Unfortunately, there is a Close button on the Growler, which when pressed leaves the user on the current page and virtually nothing working - which results in my pain.

I would appreciate any suggestions or advice.


What should happen, is that when the user’s session expires and the user attempts to invoke a command (via a button, link, hidden, etc…) the CAF.Request object looks to see if a login form is returned. If found, it is displayed at the top of the screen.

What version are you using?


Hi Mark

Thanks for the reply.

We’re using V8.

What you’ve described is correctly occuring. The Growler has a ‘login’ link and a close button. If the user clicks the login link, they are taken to the login screen - no problem. If they press the Close button they are left on the page.

The complaint that they have (after closing the Growler) is that when they next click a link or a button that invokes a command nothing happens on the screen - no action, no growler or script error.

When MWS invokes the Growler - is there a property set in the form that indicates that the session has expired?

I’ve previously looked at CAF.Request - specifically SHOW_LOGIN_FORM without success. I was hoping that setting this to true would force the login page rather than the Growler.


This is an excellent feature request. If you could add this suggestion to Empower site, that would be great.

I just don’t think that there is a generic way to intercept every failed CAF.Request (from async requests) to look for this scenario and redirect the user to a login page.

Sorry about that.