# Unable to set response.

> **ResponseSentError**: The response has already been sent to the browser and cannot be altered.

## What went wrong?

[Section titled “What went wrong?”](#what-went-wrong)

Making changes to the response, such as setting headers, cookies, and the status code can only be done in [page components](/en/basics/astro-pages/).

**See Also:**

* [HTML streaming](/en/guides/on-demand-rendering/#html-streaming)