Docs Demo Dashboard Get your key
On this page
  1. Addresses
  2. Pages
  3. Deep links
  4. Comment links

Pages, addresses and links

Every comment belongs to one page at one address. The address is where it was left, such as staging.acme.com; the page is which page there, such as /pricing.

Addresses

Each address keeps its own comments and its own layers, even when one key covers them all. A client's comments on staging stay on staging, and production starts clean.

Where the page isIts address
acme.com and www.acme.comacme.com: one address, www. is dropped
staging.acme.comstaging.acme.com, apart from production
uat.acme.comuat.acme.com, apart from both
3f9c2a1b.acme.pages.dev, 7d01e4c2.acme.pages.dev*.acme.pages.dev: every one-off deploy of the project shares one address, so comments carry over from one preview to the next. Vercel's and Netlify's one-off deploy addresses work the same way.
localhost:5173localhost:5173, with its port: another app on :3000 is another address. These comments are kept in the project folder.

Pages

At an address, comments are kept per page, and by default a page is its path: /pricing and /pricing?tab=annual&utm_source=x are the same page and show the same comments.

The side panel shows comments from every page of the layer at this address, and a comment on another page opens that page with the comment showing.

Deep links

The script reads two query parameters on your pages and removes them from the address bar as soon as it has read them, using history.replaceState. A refresh does not reopen the comment, and a copied URL does not carry someone else's notification.

ParameterMeaning
sl-commentA comment id. Once comments have loaded, if the comment is on the current page it is scrolled into view, about a third of the way down the viewport, and opened. If it is not on this page or the reader cannot see it, nothing happens.
sl-layerA layer id, or public for the site's default layer. Selects that layer before comments load, so an invitation or a shared link to one layer does not land on another. A visitor who needs an account to see the layer is asked to log in first.

Notification emails and the dashboard build these links for you. They go before a hash route, so /app/?sl-comment=…#/docs still lands on the right route. Query parameters were chosen over the hash because the hash is the one part of a URL a single-page app is likely to route on, and an unknown query parameter is ignored by every router. Your own application should not use these two names.

Every comment also has a short link, sharedlayers.com/c/…, which opens its page with the comment showing. Copy it with Copy link in the ⋯ menu at the top of the thread. Emails, Slack messages and Jira or ClickUp issues use it too, and pasted in Slack it shows a preview.