stdlib-js / www

Website for stdlib, a standard library for JavaScript and Node.js.
https://stdlib.io
Apache License 2.0
6 stars 8 forks source link

[Bug]: heuristic for determining whether settings cookies have been enabled is flawed #53

Closed kgryte closed 2 years ago

kgryte commented 2 years ago

On Safari, the checkbox indicating whether to enable settings cookies is automatically checked. This stems from a heuristic which is used to determine if a user has opted-in. Namely, if there already exist cookies: https://github.com/stdlib-js/www/blob/23fdbc6e9fe22dbe3434efc4fe62c0b57768b361/src/client.jsx#L99.

This is flawed, as our API docs currently include GA. In Safari, GA leaves a cookie resulting in a non-empty document.cookie string.

We need to make detection more robust by actually attempting to resolve expected settings cookies.

Screen Shot 2022-05-20 at 5 44 39 PM