Hi,

I see what you're saying.  However, I believe I am doing what you say
- redirecting to a success page.  sfGuard does this for logins on its
own.

My main issue isn't that the form values aren't being cleared/flushed,
it's that other portions of the page are being cached, including pages
that simply shouldn't be displayed to a user who is not signed in.

I can show you an example of what I mean on my staging site:

http://staging.goaliegigs.com
symfuser/pwdpwd

Notice the top right section says "Signin".  Click Signin, then signin
(messier/password).  Notice the top right now says: "Welcome Mark...."

Then simply hit the back button twice.  You will be back on the main
landing page, but the top right will say "Signin" again.  Of course,
if you try to signin, this won't work.  At this point, the browser
will go to the server.

Similarly, if you now click Sign Out, then you will go to a sign out
confirmation page.  But if you hit back, you will see the content you
had when you were signed in.

Somehow on the other hand, if I do similar actions on the Symfony
plugins page, it does go back to the server to refresh.  I don't know
http meta or response headers indicating no-cache or anything.  It
just seems to do it.

Thanks,
Steve



On Aug 14, 10:08 am, Phennim <phen...@gmail.com> wrote:
> Hey,
>
> Don't send a response to a browser's POST request. Instead, let the
> server handle the post request and then; redirect to a succes page.
> Since the browser has nothing to cache, it flushes the post variables.
> This is also good practice for SEO because now you have a unique url
> to check conversion rates. I also protect the success page with a
> flash parameter (or equivalent) which I set before the redirect so it
> can't be viewed without the required action.
>
> The only exception I allow is when there are validation errors, but
> only because it is too much of a hassle to save the error messages in
> flash for after the redirect...
>
> On Aug 14, 3:39 pm, Steve the Canuck <steve.san...@gmail.com> wrote:
>
> > Hi,
>
> > I understand the browser is caching the page, but there must be some
> > way of preventing the browser from simply caching the page, no?
>
> > If I go to the Symfony Plugins page and then login, I see the panel
> > indicate that I'm logged in.  If I hit back, I see a slightly
> > different page, shown to users who are logged in.  If I sign out, I
> > cannot hit back and see my previous content for a signed in user.
>
> > If I look at the response headers, or the html headers I don't see
> > anything that causes this refreshing behaviour.  I notice a lot of
> > ASP.Net sites that talk about how to modify this behavior but I'm
> > having trouble finding the right way to do this with PHP and symfony.
>
> > Regards,
> > Steve
>
> > PS: sorry for the late reply, I thought I had auto-notification turned
> > on for this thread.
>
> > On Aug 7, 8:50 am, "rooster (Russ)" <russmon...@gmail.com> wrote:
>
> > > This is normal behaviour on pretty much any website. Your browser has
> > > cached the page, not the server - and when you clickbackit simply
> > > shows you the page you were just looking at, without any request to
> > > the server at all.
>
> > > Try it on a few other web sites that have login forms - you'll find
> > > it's quite common!
>
> > > Russ.
>
> > > On Aug 7, 6:24 am, Steve Sanyal <steve.san...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > When I log in using sfGuardAuth, and then hit thebackbutton, I see
> > > > the login screen again and the content on the screen matches an
> > > > unauthenticated user.  I have to refresh the page to get rid of this.
>
> > > > How do I instead expire the page so it is not cached by the browser?
> > > > Do I do this through a meta tag or a header, and what should I set?
>
> > > > Thanks,
> > > > Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to