-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Further expand the consent info storage limit to 1200 #28917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these changes from enforcing string size to whole storage size! Do you think realistically there are any pages that will be over the limit with their current storage size?
dict({ | ||
[this.storageKey_]: value, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, why dict, instead of object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make much of a difference here given that value is calculated internally.
But dict()
returned value makes sure that JSON.Stringify()
won't error out due to functions or any unparsed stuff in Object.
I used dict()
also because that how we store values to localStorage. Kinda want to keep it the same.
amphtml/src/service/storage-impl.js
Lines 248 to 251 in 0a0269a
this.values_[name] = dict({ | |
'v': value, | |
't': Date.now(), | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation!
Sorry to report this, but we are currently experiencing a '[CONSENT-STATE-MANAGER] Cannot store consent information which length exceeds 1200. Previous stored consentInfo will be cleared' error with our cmp solution on AMP. Are there any plans to extend the localStorage usage for amp-consent to allow more than 1200 characters (1600 b64 encoded) in a near future ? |
Hi @olivervw , please see this comment regarding consent information size. |
Closes #28668
An example stored value is