Solved

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

Posted on 2008-09-29
2
1,139 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
website went down 6 57
WordPress Header Issue 9 46
Browser Chrome downloads colored link 5 41
Internet Explorer and Google Chrome will not open 14 32
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
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 +…

832 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