Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:58:21+00:00 2026-05-23T12:58:21+00:00

I copied a code piece to send files to browser. I don’t know why

  • 0

I copied a code piece to send files to browser. I don’t know why we use the lines written below cause removing these does not make any difference in my development environment.

Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;

Can anyone provide a simple break down of the intended purpose & appropriateness of these.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:58:22+00:00Added an answer on May 23, 2026 at 12:58 pm

    Response.Clear();

    If you have written anything out already to the buffer, you’ll need to clear that so extraneous content doesn’t get included.

    Response.ClearHeaders();

    If the content type had been previously specified, for example, you probably don’t want that. Any number of HTTP headers may have already been set – cache-control is another good example.

    Response.Buffer = false;

    No sense buffering the output if you’re ready to dump the file out… just send it along and don’t waste memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a piece of code, copied below, with really similar structs in which
THe code below I copied from MSDN with a bit of modification: [DllImport(user32.dll, CharSet
This is the piece of the code I copied from one of the header
I'm trying to write a small piece of code that merges lines alternatively from
so with this piece of code I've written, I was wondering why I am
I have written a piece of code, it copies the data from the entire
I copied this code from an example . I've read it 100 times. Array.prototype.map
I copied some Delphi code from one project to another, and found that it
I have this sample code for async operations (copied from the interwebs) public class
some code snippets. The java coding doing the jaxb unmarshaling. pretty straightforward, copied out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.