?
Solved

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

Posted on 2008-09-29
2
Medium Priority
?
1,197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
trickyidiot earned 1000 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 1000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
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 +…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

801 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