[thelist] Redirect AFTER Page loaded with ASP
Hassan Schroeder
hassan at webtuitive.com
Thu Sep 16 16:01:56 CDT 2004
Rob Smith wrote:
> I'm looking for cleaver ways to redirect a user AFTER stuff has been written
> to a page in ASP.
>
> Typically you can't by way of response.redirect("somepage.asp"). If you do
> this after you write stuff to the page, you get an error.
I don't do ASP, but any server language faces the same issue -- you
can't send a redirect *header* after you've started writing content.
The only way I can imagine getting around this is writing the page
content to a buffer rather than STDOUT and only flushing it if/when
you decide you're not going to redirect.
/* Actually, JSP output is written to an 8K buffer by default; that
size is configurable, as well as an "autoFlush" attribute being
(true|false) -- maybe ASP has something comparable?)
*/
FWIW,
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list