# Browser

Source: https://athas.dev/docs/browser

Open web pages and local development servers in editor tabs

Athas can show web pages in tabs next to your code, so a local development server, its docs, or
an issue tracker stays one tab away while you work.

## Opening a Browser Tab

- Choose **New Browser Tab** from the **+** menu of any tab bar
- Run **Browser: New Browser Tab** or **Browser: Open URL...** from the command palette

Type an address or a search into the address bar and press `Enter`. Addresses without a scheme
work as you would expect: `localhost:5173`, `127.0.0.1:8080/health` and `:3000` open over HTTP,
`athas.dev/docs` opens over HTTPS, and anything else searches the web.

Links a page opens in a new window open as a new browser tab. Mail and phone links open in your
default apps. Downloads are saved to your Downloads folder, and a toast lets you reveal the file
when it finishes.

## Tabs and Panes

Browser tabs behave like other tabs: split them, move them between panes, pin them, and reorder
them. A page keeps running while its tab is in the background, so switching back never reloads it
or loses what you typed. Open browser tabs, their addresses and zoom levels are restored when you
reopen the workspace.

## Shortcuts

While a page has focus, it receives its own keyboard shortcuts, except the ones that move around
Athas: the command palette, quick open, new, close and reopen tab, tab switching, and toggling the
sidebar or terminal keep working. Rebinding those commands in [keymaps](https://athas.dev/docs/keymaps) changes
them for browser tabs too.

| Action                | macOS                       | Windows, Linux                 |
| --------------------- | --------------------------- | ------------------------------ |
| Focus the address bar | `Cmd+L`                     | `Ctrl+L`                       |
| Reload                | `Cmd+R`                     | `Ctrl+R`                       |
| Back / Forward        | `Cmd+[` / `Cmd+]`           | `Ctrl+[` / `Ctrl+]`            |
| Zoom in / out / reset | `Cmd+=` / `Cmd+-` / `Cmd+0` | `Ctrl+=` / `Ctrl+-` / `Ctrl+0` |
| Page developer tools  | `Cmd+Alt+I`                 | `Ctrl+Alt+I`                   |

## Privacy and Security

Pages run in the system web view (WebKit on macOS and Linux, WebView2 on Windows) and keep their
cookies and storage in a browser profile separate from Athas itself. **Clear Browsing Data** in
the page menu removes that profile's cookies, storage and cache; on macOS it needs macOS 14 or
later.

Pages cannot call into Athas. The only thing a page can tell Athas is which tab has focus, its
title, icon and history position, and which of the shortcuts above was pressed. Pages can never
load the Athas interface itself or local files.

Developer tools for pages are available in development builds of Athas.

## Local development servers

Start the server in a [terminal](https://athas.dev/docs/terminal) before opening its localhost address. A refused connection usually means the process is stopped or listening on a different port. A browser tab is local to your device; [Preview links](https://athas.dev/docs/previews) expose a chosen local port to other people.
