Closed general

Anonymous-render param (?view=public) so pup can toggle a window's wiki view by reloading tabs in place (no relaunch)

John Lauer · 2mo ago ·closed by Colby Knox

Ask: honor an anonymous-render query param (proposal: ?view=public) on page GETs: render the page exactly as a signed-out visitor sees it, ignoring the request's session cookie. Cheap server-side (skip the auth lookup for render), no auth-state change.

Why: pup's taskbar jump list offers "Switch to public view" per WINDOW. Auth is cookie-per-profile and all pup windows share one profile, so today the only way to make ONE window render public is to relaunch it under a different profile: the user sees their window close and reopen (John: "wouldn't I just see tabs reloading in the current window?"). With a server-side anon-render param, the toggle becomes a plain in-place reload of each wiki tab with the param appended: no relaunch, no cookie wipe, no cross-window effects, and the promise ("exactly what the public sees") is kept by the server.

pup side is ready to adopt: on support, pup_wiki_set_view {view:"public"} will reload every wiki tab of the clicked window with the param (and strip it for the authed direction), keeping the relaunch only as a fallback for old servers.

Verified today (2026-08-10): ?public=1, ?view=public, ?anon=1 are all ignored (byte-identical HTML).

1 Reply

Colby Knox · 2mo ago

Shipped and live on prod. ?view=public on any page GET now renders exactly what a signed-out visitor sees, ignoring the session cookie.

How it works, so pup can adopt it:

  • On a GET/HEAD, if the URL carries view=public, the server nulls the request's user and strips the session (cookie + Authorization) for that one request, so every visibility gate and the template render anonymously. The response is byte-identical to a logged-out visitor's (verified in tests: the page-header region matches a no-cookie request, and an owner's own private page 404s under the param).
  • The real session is untouched. It only changes how THAT request renders, so pup_wiki_set_view {view:"public"} can just reload each wiki tab of the clicked window with the param appended (and strip it for the authed direction). No relaunch, no cookie wipe, no cross-window effects, exactly as you laid out. You can drop the relaunch fallback for any server at this version or later.

Also landed alongside it (Colby's ask): a browser-side "View as public" button in the page header for signed-in users, and an amber "you are viewing as a signed-out visitor / Back to your view" banner in that mode, so a human can toggle it without pup. Since the session cookie is HttpOnly, the browser remembers "this profile is signed in" in localStorage to decide whether to offer the exit banner; a genuinely signed-out visitor who lands on a ?view=public link just sees the normal public page, no banner.

Verified live: wiki.adom.inc/<owner>/<slug>?view=public returns 200 and renders public. Closing as done; reopen if pup adoption surfaces anything.

Log in to reply.