else
SaveFiles()
' the redirect would go here
end if
Would do the same and save a few CPU clock cycles
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
I don't understand what you mean in the second one when you say "although as the response.write will never be seen" and "Would do the same and save a few CPU clock cycles". Can you educate me?
because of the speed of a server side redirect the response.write savefiles() would finish buffering the data and then the redirect would occur.
The buffered data would never be sent to the client browser.
So as the SaveFiles routine does no client output, it can be called and then redirected.
The server resources and CPU time taken to buffer the output would not be needed. It would make a very limited difference to the server overheads but every little helps as they say.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
If you want to ensure the post data is lost in the redirect (so no warning messages on refresh) you would need to use a 301/302/307 redirect.
Code:
<%
'response.status = "301 Moved Permanently"
'response.status = "302 Found"
response.status = "307 Object Moved"
' set the type of redirect required
response.addheader "Location", "landing_page.asp"
response.end
%>
uncomment the one you want to use.
or a transfer could be used.
Code:
server.transfer("landing_page.asp")
This would transfer processing to the destination page and the variables and form data would be intact so if needs be you could print out results on the landing page.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System