Actually you do have a point. I didn't think about exit()
I can surely use this, and the connection overhead is not of a major concern to me - definitely no more then displaying the newly inserted row - at the same time I would like *not* to abandon a search for an even better code if possible. Unless there doesn't exist any alternates, which still stumps me.

Thanks!


On Jul 22, 2008, at 10:37 AM, Andrew Ballard wrote:

On Tue, Jul 22, 2008 at 10:24 AM, Rahul S. Johari
<[EMAIL PROTECTED]> wrote:

It works, but it's not the most efficient solution. The page has heavy graphics & text. Using the header("Location: a.php") loads the page in
question twice. Slower connections will respond slowly to the page.

No, it really doesn't. A redirect should be followed with an exit() to
stop execution after the Location header is passed, so you don't need
to send all the "heavy text" or the IMG tags to embed the images, and
most client browsers will stop rendering the page as soon as they see
this header and therefore won't request the "heavy images" in any
event. Granted, there is still the connection overhead caused by an
additional request.


In theory, the header() statements for not using cache should have worked - I'm not sure why they are working. Even Googling the loading from cache
problem gives those statements in various places.


On Jul 22, 2008, at 10:16 AM, Jason Pruim wrote:

Without seeing the code it's hard to tell.. But couldn't you just use a header("Location: a.php"); after the insert statement? Or is that too ugly
of a hack? :)

It works for me on a project I'm working on.



(I hope this doesn't get lost in all the top posting on this thread.)

Andrew

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


---
Rahul Sitaram Johari
Founder, Internet Architects Group, Inc.

[Email] [EMAIL PROTECTED]
[Web]   http://www.rahulsjohari.com





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

Reply via email to