← Back to Request and Response Mastery
Lesson 2

The Response Object

Request and Response Mastery · Created 2026-06-01 13:34:28

The Response object controls what ASPPY sends back to the browser.

Key Members
Response.Write('text') - sends output
Response.Redirect('url') - 302 redirect
Response.Buffer = True - enables buffering (default)
Response.Clear() - clears buffered output
Response.Flush() - sends buffer immediately
Response.End() - stops page processing
Response.ContentType = 'text/xml'
Response.AddHeader 'X-Custom', 'value'
Response.Status = '404 Not Found'
Response.Expires = 0
Response.CacheControl = 'no-cache'

Important
Never call Write before Redirect. Always call Response.End after Redirect.

Live Demo →