Solved

In classic ASP / VBscript, does response.redirect abort the script?

Posted on 2008-09-29
2
1,130 Views
Last Modified: 2010-05-18
From what I understad the response.redirect command tells the browser to go to a given location. But if the browser is tweaked to override such commands, would that make the vbscript to continued running?

The also raises the question whether reponse.redirect is acceptable when denying access to a area for logged user only etc.
0
Comment
Question by:Alfahane
2 Comments
 
LVL 6

Accepted Solution

by:
trickyidiot earned 250 total points
ID: 22600237
VBScript is handled server-side before the output is handed to the end-user.

The script should stop executing after the response.redirect is sent, but if you want to be 100% sure, you can put
Response.End
after that line.
0
 
LVL 12

Assisted Solution

by:Pugglewuggle
Pugglewuggle earned 250 total points
ID: 22602984
Yes - response.redirect does abort the scipt's execution and redirects the user to another page.
Use response.end
That is the best way to just STOP execution. Generally you want to output some sort of error message before you stop the execution so as to not confuse a user.
Another thing to consider is that you should set all recordsets and other DB objects to nothing to conserve memory. It doesn't really matter unless it's a large scale site, but it's best practice to free up that memory before killing the script.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now