Fórum
logout problem
Syed Umair, modificado 11 Anos atrás.
logout problem
Junior Member Postagens: 36 Data de Entrada: 11/10/12 Postagens Recentes
Hi,
I am developing a portal in liferay 6.1.1 CE. The problem I am facing is when user logs out from portal, he or she can revisit the portal pages using browsers back button. I don't want to allow the users to do that. How can I disable this feature.
Any valuable suggestions, please???
Thnx,
Umair
I am developing a portal in liferay 6.1.1 CE. The problem I am facing is when user logs out from portal, he or she can revisit the portal pages using browsers back button. I don't want to allow the users to do that. How can I disable this feature.
Any valuable suggestions, please???
Thnx,
Umair
Pavel Savinov, modificado 11 Anos atrás.
RE: logout problem
Junior Member Postagens: 94 Data de Entrada: 24/09/12 Postagens Recentes
Hi.
You can try 2 ways:
1) Set no-cache value for Cache-Control header in web.xml, like this:
2) Prevent Back button pressing with JS on each page, like this:
First way is not good because it will disable caching and slow down your app.
Second way is not good because it will cause page "winking".
Maybe someone has better variants?
You can try 2 ways:
1) Set no-cache value for Cache-Control header in web.xml, like this:
<filter>
<filter-name>Header Filter</filter-name>
<filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
<init-param>
<param-name>filter-class</param-name>
<param-value>com.liferay.portal.servlet.filters.header.HeaderFilter</param-value>
</init-param>
<init-param>
<param-name>Cache-Control</param-name>
<param-value>No-cache</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Header Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
2) Prevent Back button pressing with JS on each page, like this:
<script type="text/javascript">
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
First way is not good because it will disable caching and slow down your app.
Second way is not good because it will cause page "winking".
Maybe someone has better variants?
John Carter, modificado 11 Anos atrás.
RE: logout problem (Resposta)
Junior Member Postagens: 53 Data de Entrada: 18/10/12 Postagens Recentes
try this
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1
Syed Umair, modificado 11 Anos atrás.
RE: logout problem
Junior Member Postagens: 36 Data de Entrada: 11/10/12 Postagens RecentesJohn Carter:
try this
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1
Should I put this parameter in portal-ext.properties file?
Syed Umair, modificado 11 Anos atrás.
RE: logout problem
Junior Member Postagens: 36 Data de Entrada: 11/10/12 Postagens RecentesJohn Carter:
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1
Thnx John, It works great for me.