Disable browser password saving when redirecting

I am trying to skip the browser prompt to save the password for my login form.

I already checked this question and added the autocomplete = "off" attribute (both in the form and in the fields).

Just switching to another page works great. However, when I use ?faces-redirect=true (in my Home ), I get an invitation.

admin.xhtml:

 <h:form id="form" autocomplete="off"> <p:growl id="growl" showDetail="true" sticky="false" life="3000" /> <p:layout fullPage="true"> <p:layoutUnit position="center" > <p:panel id="loginPanel" visible="#{not admin.loggedIn}"> <h:panelGrid columns="2" cellpadding="5"> <f:facet name="header"> <h:outputLabel value="Administration" /> </f:facet> <h:outputLabel for="username" value="Username:" /> <p:inputText id="username" value="#{admin.username}" required="true" autocomplete="off" label="username" /> <h:outputLabel for="password" value="Password:" /> <p:password id="password" value="#{admin.password}" required="true" autocomplete="off" label="password" /> <f:facet name="footer"> <p:commandButton value="Login" update="growl loginPanel logoutPanel" process="loginPanel" actionListener="#{admin.login}" /> </f:facet> </h:panelGrid> </p:panel> </p:layoutUnit> <p:layoutUnit position="north" size="85"> <p:panel id="logoutPanel"> <p:commandButton value="Home" process="@this" action="#{menuBean.goHome}" actionListener="#{admin.logout}" /> <p:commandButton rendered="#{admin.loggedIn}" value="Logout" update="loginPanel logoutPanel" process="@this" actionListener="#{admin.logout}" /> </p:panel> </p:layoutUnit> </p:layout> </h:form> 

MenuBean:

 public String goHome() { String goToPage = "home.xhtml?faces-redirect=true"; return goToPage; } 

Is there any way to handle this?

Update I am using JSF 2.2.0 and Primaces 5.1. The problem appears in Chrome 42.0, I will test and update for other browsers.

Update 2 seems to work correctly for IE 8.
I tried passsthrough attributes (I can see autocomplete=off in the generated source), but the behavior is the same.

  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:a="http://xmlns.jcp.org/jsf/passthrough" xmlns:p="http://primefaces.org/ui"> <h:form id="form" a:autocomplete="off"> 

Update 3 I tried disabling caching in the following ways:

Added meta tags to admin.xhtml :

  <h:head> <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> <title>Administration</title> 

Added NoCacheFilter as indicated by this answer . HTTP headers updated correctly:

Chrome Developer Tools

However, when I am redirected to home.xhtml in Chrome, I get an invitation.

+5
source share

All Articles