cancel
Showing results for 
Search instead for 
Did you mean: 

Back button behavior... STATE_SAVING_METHOD?

csiege
Champ in-the-making
Champ in-the-making
Hi,

Noticed the behavior of using the browsers back button in the web client.  It can get the user confused when the server thinks the user is on a different page.

Found the following on http://www.jsf-resources.com

In many cases when using JSF, you?ll notice that the back button does not behave as expected. This is due to the fact that the state is saved on the server, and when you use the back button, the server still thinks you are on a different page. Adding the following will save the state on the client side, making the back button behave in a more expected manner. 

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>

What would be the affect of changing this in alfresco?  Is there a specific reason why it is set to "server" in the web.xml file?

thanks!

Chris
1 REPLY 1

kevinr
Star Contributor
Star Contributor
Client-side state saving is a "nice idea" in JSF but inherently flawed - it assumes all state is serializable and is terrible for the performance of the server. The "double post" needed after a Back button is something we have to live with after choosing JSF as our web-development framework The Microsoft .net web-framework also suffers from exactly the same issue, unfortunately it seems to be a common problem of many modern component based web UI frameworks.

Thanks,

Kevin