-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make subscription and filter cookies split into multiple cookies if they're too large #288
base: main
Are you sure you want to change the base?
Conversation
…e old cookies properly delete
…cookies getting merged
…n cookies occasionally getting merged
…e old unused subscriptions/filters cookies
Alright! As far as I can tell everything is working and I've handled all the situations I can think of. I'm sure there are things that can be cleaned up and written better, and I strongly encourage more people to test it, but it does work and you can have a theoretically infinite amount of subscriptions or filters. |
Does #336 being merged violate any assumptions made in this PR? |
Just gave it a test and it still works fine! Everything under the hood still has cookies as one long string for compatibility, so I don't expect any interference from changes to that sort of stuff . |
Basically the title. This would fix #279. Also fixes a problem of empty cookies not being deleted.
This branch currently has subscriptions and filters split into
subscriptions
,subscriptions1
,filters
,filters1
, etc.Still left to figure out:
subscriptions
andfilters
cookies?Currently this only works if you don't have any old cookies. They still function, and if you change anything you'll get the new cookies with correct values. The problem is the old cookies stay and don't get updated. Would it be better to make this new system start withsubscriptions
and then the next cookie would besubscriptions1
in order to not break things? I started on it but it seemed like it was going to add more complexity than the next solution. Or would it be better to just convert to the new system and delete the oldsubscriptions
cookie if it exists? Seems like code that's eventually useless if we went that direction.join_until_size_limit()
be made smarter?Characters with accents like ã are more than one byte, but this only checks the length of the string. Are special characters even allowed in subreddit/user names?