# Accounts and saving

Pasty saves continuously. There is no save button; the status beside the title says `Saved` once the work has actually landed, and says where the work is when it has not.

## Without an account

Your document lives in this browser and never reaches a server. Pasty keeps one draft per browser: opening `/` resumes it, and reloading resumes it. `/new` is an explicit request for a blank page, so if the draft has content the browser asks before replacing it. Cancelling keeps the draft.

The anonymous banner is the one thing that will keep reminding you that this is a single browser's storage. Dismiss it for the visit; it comes back on the next one, because the fact it states is still true.

## Signing up

[Creating an account](/signup) keeps what you were writing. The draft in this browser becomes your first saved document, and it is cleared from the browser only after the server has confirmed its copy, so signing up mid-edit cannot lose work. A document imported from the [command line](/docs/cli) before you had an account is claimed the same way.

Preferences survive too. Vim mode is remembered in this browser while you are signed out and on your account once you are signed in, and signing up carries the browser's setting across. The appearance choice stays with the browser, because dark mode belongs to the reader, not the document.

## The homepage is always a new document

Signed in, `/` is a blank editor, every time. It used to resume your most recent document, which read as a courtesy and behaved as a hazard: "most recent" was by construction whatever you were typing into, so a second tab was guaranteed to join the first one. The way back to earlier work is the command palette. `⌘K` lists your documents by title, and `⌘1` through `⌘9` open the most recent ones directly.

A document is named after its first line, which is what makes that list worth reading. See [Getting started](/docs/getting-started) for the rule.

## When two tabs disagree

Every save names the revision it was built on, and the server accepts only a match. Two tabs that both edited the same document end in a question rather than a lost paragraph: the status line says `Changed elsewhere`, and a notice offers `Use latest` and `Keep mine`. Neither choice destroys anything. `Keep mine` archives the other version on the server, and both branches keep a copy in this browser.

Work a previous visit never managed to send is offered back the same way, as `Restore` or `Discard`, the next time the document opens.

## Sharing

Sharing is for accounts, because an anonymous document has nothing server-side to share. The [Sharing](/docs/sharing) page covers the read-only link, the edit link, and live editing.

## Deleting a document

`⌘K` → `Delete document`, on a document that has been saved to your account. It asks first, and then the document is gone: its share and edit links stop working for everyone holding them, and there is no undo. From the terminal it is `pasty delete`, which asks too, unless you pass `--yes` — see [Command line and Pasty CLI](/docs/cli).

## Not in this version

Folders, and browsing the archived versions a conflict leaves behind.
