Security Optional
Wipe browser data on sign-out
Send Clear-Site-Data when a person signs out. Then their data does not stay behind in the browser.
How to do it
Send Clear-Site-Data: "cache", "cookies", "storage" on the sign-out response.
Example
HTTP/2 303
location: /
clear-site-data: "cache", "cookies", "storage"
How to check
A test signs out and reads the response headers, which include Clear-Site-Data. In DevTools, the site's cookies and storage are empty afterwards.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/security/clear-site-data.