mirror of
https://github.com/discourse/discourse-placeholder-theme-component.git
synced 2026-09-17 15:42:13 -04:00
Setting cookies means that they're sent in the request headers for every HTTP request. This will have a (tiny) impact on performance, plus it can raise privacy concerns. Using localStorage is more appropriate for this use case. This commit includes migration logic for any previously-saved values. Previously the cookies were set to last for the 'session'. localStorage doesn't have an expiration mechanism, so this commit implements a 7-day expiration on the values.