On Mon, 11 Jul 2011 11:48:09 -0700
Jerry Pereira <online.je...@gmail.com> wrote:
> 1. User types the URL - www.example.com, this will display the login
> page.
> 2. Once the user enters the credentials and hits submit, the request
> is posted to www.example.com/login action.
> 3. If the credentials entered by the user is valid then i would like
> to show the home page..uri
> 4. I am able to show the homw page, but the URL does not change to
> www.example.com/home, instead it remains the same (i.e.
> www.example.com/login). 

One important reason to do something like that is because you do not
want the user to bookmark or otherwise pass on an url with completely
ambiguous content -- /login should refer to the login page, /home should
refer to the home page, they are two different things.  Having /login
refer to both is no good. So I think your desire is justified.

IMO, this is best handled client-side: you return your login data via
an AJAX call.  If the login succeeds, the client loads /home.  If the
login has failed, the client displays a message to that effect.   You
need to prevent spoofed access to /home, but of course you have to do
that anyway (via cookies or whatever method you are already using).

-- 
"Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
"The angel of history[...]is turned toward the past." (Walter Benjamin)

Reply via email to