Financial-Times / n-service-worker

❌ DECOMMISSIONED Global service worker component for next.ft.com
5 stars 2 forks source link

Remove check for cookie length #198

Open GlynnPhillips opened 9 months ago

GlynnPhillips commented 9 months ago

Allow the service worker to register even if the cookie length is greater than 4000.

Currently many users have cookies longer than 4000 so this will be preventing users from choosing to receive instant alerts as push notifications and in some cases it might be preventing users who have chosen that delivery method from receiving them.

Looking up service worker documentation and examples I can no longer find any reference for the need to check the cookie length. As a lot has changed in browsers and APIs such as service workers in the last 7 years I am hoping that this was a quirk of the API in its early days.

I have tested in Chrome and Firefox with cookie lengths greater than 4000 and I do not see any noticable issues with the service worker registering or receiving updates.