# Quit Browser

<figure><img src="/files/c1xa8Ceey7rqDUtOeC9T" alt=""><figcaption></figcaption></figure>

The **Quit Browser** block allows you to close the browser that your TaskBot is using.

{% hint style="success" %}
You might not need this block. If your TaskBot uses a browser, the browser automatically closes when the TaskBot run ends (unless **Stay on page after run** is enabled in your TaskBot's **Browser Launch Settings** or a [**Launch Browser**](/using-zerowork/using-building-blocks/launch-browser.md) block).
{% endhint %}

#### How To Use It

This block works without configuration, but has one optional setting.

**Force quit**

<figure><img src="/files/ruzF6ckLbP9B7JRRVTVK" alt=""><figcaption></figcaption></figure>

When **Force quit** is checked, the browser instance is forcefully terminated regardless of whether other TaskBots are sharing the same browser instance.

{% hint style="danger" %}
Force quitting a browser context shared with a sticky profile used by other TaskBots will close the sticky profile for all TaskBots using it, not just the currently running TaskBot.
{% endhint %}

#### Things To Know

* **A browser isn't required.** If there's no browser context when this block runs, it logs a warning and continues. Your TaskBot won't fail.
* **Sticky profiles are respected by default.** If other TaskBots are sharing the same sticky profile browser, this block closes your tabs but leaves the browser running for them. The browser only fully quits when the last TaskBot using it leaves.
* **Stay on page after run is overridden.** Even if **Stay on page after run** is enabled in your [Launch Browser](/using-zerowork/using-building-blocks/launch-browser.md) settings, this block fully closes the browser. An explicit quit takes priority.
* **You can relaunch after quitting.** Placing an [Open Link](/using-zerowork/using-building-blocks/open-link.md) or [Launch Browser](/using-zerowork/using-building-blocks/launch-browser.md) block after a Quit Browser block launches a fresh browser context.

#### Block Behavior

* **When a browser exists** the block closes the browser and all its pages.
* **When no browser exists** the block logs a warning and continues.
* **When a sticky profile browser is shared with other TaskBots** the pages being used by your TaskBot are closed, but the browser stays running for other TaskBots.
* **When Force quit is enabled** the browser is terminated regardless of shared instances or **Stay on page after run** settings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerowork.io/using-zerowork/using-building-blocks/quit-browser.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
