Question: I have some login information, let say user name, login email Id and location.

> 
> I want keep this information in the browser even after the user
>  logout and close the window.
> 
> 
> 

By this when user comes back after a logout or session expiry, the web application fills the client user name and ask for the password from the user. *The best example of my requirement is google login.!!*

Currently i am using only session and no cookies. 

What are the possible solutions.?

Answer: 
I think you could use cookies for storing data on client side, follow this link 

<http://www.tutorialspoint.com/jsp/jsp_cookies_handling.htm>

set storing age using the method public void setMaxAge(int expiry);

Also another solution is local storage in **HTML5**
but this is supported only in latest browsers.

<http://www.w3schools.com/html/html5_webstorage.asp>

<http://diveintohtml5.info/storage.html>

hope these links will help you
[LocalStorage](http://www.w3schools.com/html/html5_webstorage.asp) is considered to be the best solution for storing values permanently in the browser.!!
A good explanation about the [LocalStorage](http://www.w3schools.com/html/html5_webstorage.asp) can be found [here](http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html).

This is my code used to save the value to the [LocalStorage](http://www.w3schools.com/html/html5_webstorage.asp). 

```
         function saveLoginNameToLocalStorage()  
                {
                 if(typeof(Storage)!=="undefined")//checks whether the browser support localStorage
                  {
                        // you dont want to create a variable by var variablename, 
                        // just give it as localStorage.yourVariableName, before assigning 
                        // any values the variable is shown as  undefined.
                         if(localStorage.userName &amp;&amp; localStorage.userName !="" &amp;&amp; localStorage.userName==document.getElementById("userName").value){
                            document.getElementById("redirectUrl").value=localStorage.redirectURI;
                        }
                        else{
                            localStorage.redirectURI="";
                            document.getElementById("redirectUrl").value="";
                        }
                         localStorage.userName=document.getElementById("userName").value;
                         localStorage.redirectURI="";
                  } 
                }

```

You can access the variable using `localStorage.userName` from anywhere in the browser. Worked well for me. ;-)

Thanks everyone for the help provided..!!