Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
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…

743 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

9 Experts available now in Live!

Get 1:1 Help Now