Re: php and session issues continued...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, September 16, 2006 5:24 am, Dave Goodchild wrote:
> When each form is successfully processed the user is redirected to the
> next
> stage using header('Location...'). I call session_write_close before
> that to
> ensure the session data is written out before the redirect, but the
> problem
> persists.
>
> Anyone recognise this issue. It is not IE-specific as it happens to me
> on
> Firefox intermittently. I am at my wits end! Thanks in advance for any
> help!

Rant #37

99.99999% of the time, people doing this are just re-directing to a
page on their own server.

You can play with all kinds of weird things for the rest of you
career, lose all you hair, and chew a lot of aspirin, while you are
WASTING http connections bouncing the client / server connection like
a cheap rubber ball (only it's a very EXPENSIVE rubber ball)...

*OR* you could wise up and just INCLUDE the file you are currently
using header("Location: ") to get to.

You might have to re-structure your web application a tiny bit, but it
will be a better structure than the mess I usually see with all these
re-directs.

You'll certainly save on bandwidth/hardware as your connections aren't
chewed up by re-directs.

And, most importantly, you'll have a solution that "just works" on all
the browsers, as you eliminate the cookie/location conflict.

I can pretty much guarantee somebody will post how well re-direct +
cookies works for them, and I'm full of it.  I don't see how that
could be true with extensive browser-testing...  Oh well.  Choose your
poison.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux