Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Syed Umair
logout problem
29 de Outubro de 2012 23:20
Resposta

Syed Umair

Ranking: Junior Member

Mensagens: 36

Data de entrada: 11 de Outubro de 2012

Mensagens 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??? emoticon
Thnx,
Umair
Pavel Savinov
RE: logout problem
30 de Outubro de 2012 00:37
Resposta

Pavel Savinov

Ranking: Junior Member

Mensagens: 97

Data de entrada: 24 de Setembro de 2012

Mensagens recentes

Hi.

You can try 2 ways:

1) Set no-cache value for Cache-Control header in web.xml, like this:
 1 <filter>
 2    <filter-name>Header Filter</filter-name>
 3    <filter-class>com.liferay.portal.kernel.servlet.PortalClassLoaderFilter</filter-class>
 4    <init-param>
 5        <param-name>filter-class</param-name>
 6        <param-value>com.liferay.portal.servlet.filters.header.HeaderFilter</param-value>
 7    </init-param>
 8    <init-param>
 9        <param-name>Cache-Control</param-name>
10        <param-value>No-cache</param-value>
11    </init-param>
12 </filter>
13 <filter-mapping>
14     <filter-name>Header Filter</filter-name>
15     <url-pattern>/*</url-pattern>
16 </filter-mapping>


2) Prevent Back button pressing with JS on each page, like this:
1 <script type="text/javascript">
2   function preventBack(){window.history.forward();}
3    setTimeout("preventBack()", 0);
4    window.onunload=function(){null};
5 </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?
parikshit sharma
RE: logout problem
30 de Outubro de 2012 00:39
Resposta

parikshit sharma

Ranking: Junior Member

Mensagens: 48

Data de entrada: 18 de Outubro de 2012

Mensagens recentes

try this
http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1
Syed Umair
RE: logout problem
30 de Outubro de 2012 00:46
Resposta

Syed Umair

Ranking: Junior Member

Mensagens: 36

Data de entrada: 11 de Outubro de 2012

Mensagens recentes

John 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
RE: logout problem
30 de Outubro de 2012 00:54
Resposta

Syed Umair

Ranking: Junior Member

Mensagens: 36

Data de entrada: 11 de Outubro de 2012

Mensagens recentes

John Carter:

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/browser-cac-1



Thnx John, It works great for me. emoticon