Re: General use of rewrite / redirect

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

 



Quoting Aschwin Wesselius <aschwin@xxxxxxxxxxxxxx>:

Per Jessen wrote:

header(location) mechanisms do come with a very huge disadvantage if
you don't use them with caution. Requests are reinitialised, libraries
loaded (again), DB connections setup/checked again, session lookups
are being done, log write for another request etc. That's quite an
impact for just not knowing what to do with flow.

I'm having difficulties following you - a plain 303 redirect to a "Thank
you" page shouldn't cause all of that.  It's an HTTP reply with the 303
and the new URL, followed by a single URL request from the browser.

OK. I think I know how other people (like you) think about just
requesting URL's one after another. If that's not such a performance
issue for you, fine.

People like who? Come on we try to help.


A plain 303 redirect mostly isn't just a HTML file, it's another script
(or the same script with another action falling through a switch
statement, whatever).

A 303 is whatever you make of it.


Point is: why hitting you webserver with multiple requests per user,
just after submitting a form or whatever caused the redirect? If you
have 2 users per day, that won't hurt. But if you have 30.000
concurrent users a minute, that could be 60.000 requests (besides all
the images, stylesheets, javascripts that are being re-requested). Or
am I talking nonsense?

True. Why hit your webserver with useless requests.
But if you submit a form. There must be a action behind it .. right?
So you either reload the page, use header() or some other method. The next page needs to be loaded. And so will CSS, JS, images.

--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other....'/



--
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