▲ | kijin 4 days ago | |||||||||||||||||||||||||
It means that you are setting cookies on whatever page you're on, without considering whether the cookie will be consistently accessible on other pages. For example, you set the currency to EUR in /product/123, but when you navigate to /cart and refresh, it's back to USD. You change it again to EUR, only to realize in /cart/checkout that the USD pricing is actually better. So you try to set it back to USD, but now the cookie at /cart conflicts with the one at /cart/checkout because each page has its own cookie. | ||||||||||||||||||||||||||
▲ | oneeyedpigeon 4 days ago | parent | next [-] | |||||||||||||||||||||||||
If you want cookies to be global, set them to / or leave out the path. If you want more fine-grained cookies, use a specific path. What's the problem? Currency is—in your example—clearly a site-wide setting. I think sites should make more of their hierarchical structure, not less. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | foldr 4 days ago | parent | prev [-] | |||||||||||||||||||||||||
Isn't that just the feature working as intended? Of course it is possible to introduce a bug by setting or not setting a cookie somewhere where it should/shouldn't be set. I've never found a use for path-based cookies personally, but I'm not sure this is a particularly compelling example. | ||||||||||||||||||||||||||
|