Re: General use of rewrite / redirect

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

 



Aschwin Wesselius wrote:
> Per Jessen wrote:
>>
>> 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.

It's not really - serving URLs one after another is what apache is good
at :-)

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

I disagree - unless the 303 directs back to a new form-entry, the
redirect URL is almost always a plain static page.  Well, in my designs
anyway.

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

Of which a lot will be cached.  But I get your point.
The main question is - what is the alternative to the 303?  Sometimes I
use a method where I set a messages in $_SESSION which will then be
displayed on the next page, but I usually only use that in closed
(=non-public) web-apps.  Even then I still issue the 303 - I don't see
how you can get around that.

Wrt performance - the old adage of "buy a bigger box" is becoming more
and more applicable every day.  It's not always one I agree with, but
sometimes performance problems _are_ best solved by a bigger box.

> Or am I talking nonsense?

You seem to be stuck on the possible performance issues in the
superfluous serving and processing of a "Thank you" page.  Granted, if
your thankyou.html includes all sort of superfluous processing, you've
got a problem, but you solve that by getting rid of all that superfluous
code (in the 303 page).



/Per Jessen

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