Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-09-29
2
Medium Priority
?
1,232 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
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.
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…
Suggested Courses

618 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