Another way to store booleans that can be worth mentioning is to add (or not) a parameter in the url without a value.
To reuse the example from https://antonz.org/storing-state/#boolean-value
{"search": "potatoes", "popular": true} can be serialized as ?search=potatoes&popular