-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
-
Why is cache-sprite-plyr stored in Local Storage?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 4 replies
-
It's to improve the perceived speed of subsequent loads of the SVG sprite sheet. On first load, the sprite sheet is stored in local storage (it's small) and then for subsequent loads the sprite is pulled from local storage initially (so the UI renders fast) and then updated when the network request succeeds.
https://github.com/sampotts/plyr/blob/master/src/js/utils/load-sprite.js#L64
Beta Was this translation helpful? Give feedback.
All reactions
-
Ok, thx for the answer. So Session storage could have been used as well? Just asking due to "privacy" concerns
Beta Was this translation helpful? Give feedback.
All reactions
-
hi @sampotts , I hope this is the correct place to ask. Before I get to my question, here is a bit of context. I noticed in the network tab that the blank.mp4
video which is loaded via cdn.plyr.io/static/blank.mp4
has a Report-To
line in the response headers which references Cloudflare
. I quickly looked around for what this header is about and I guess that you use it for security violation reporting. My question is; do the security violation reports store any sort of end user information ( device model, operating system, network information, etc. ). The purpose of my question is probably obvious now, I need to know so that I can disclose this in our cookie policy on a client project for which we are using plyr
. Finally, thank you for Plyr. Greets, Ben
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi Ben,
The blank.mp4 file was intended to prevent an error when switching sources. There may be a better way these days. You can download it and host it yourself if need be. As for proper logging, due to the amount of traffic (sometimes 4-5k RPS, ~250M requests a day) I can't afford to turn it on. However, I do get access to the Top 15 "Source IPs" (which is considered PII in some places) in Cloudflare. That's the only information I get, and for reference to appear in that list for the last 30 days, they would need to have made more than 25k requests, the range is 25k-125k requests. There's some more info on Cloudflare & GDRP here https://www.cloudflare.com/en-au/trust-hub/gdpr/
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thanks for the information, Sam.
Beta Was this translation helpful? Give feedback.