[Catalyst] HOWTO: extend the Authentication tutorial example and redirect to original URI

Dave Rolsky autarch at urth.org
Thu Mar 29 18:04:38 GMT 2007


On Thu, 29 Mar 2007, Jay K wrote:

> Another thing to keep in mind here is that if you are not very
> particular with your cache-control headers - Many browsers will cache
> your page.  So if you are accessing /articles/1723, and it detaches
> to the login procedure, when the user hits /articles/1723 again - it
> will often bring up the login page out of cache.   You can avoid this
> if you are sure to set your cache control headers properly within
> your login action, but for this type of thing, I always try to use
> redirect, because it saves me trying to figure out what the hell is
> going wrong later.

I think the "right" way to do this if you don't redirect is to send HTML 
content along with a 401 header. That should prevent caching, since after 
a valid login the page will return a 200 header.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/



More information about the Catalyst mailing list