Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cache-sprite-plyr #2650

Unanswered
dapapro asked this question in Q&A
Mar 27, 2023 · 1 comments · 4 replies
Discussion options

Why is cache-sprite-plyr stored in Local Storage?

You must be logged in to vote

Replies: 1 comment 4 replies

Comment options

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

You must be logged in to vote
4 replies
Comment options

Ok, thx for the answer. So Session storage could have been used as well? Just asking due to "privacy" concerns

Comment options

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

Comment options

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/

Comment options

Thanks for the information, Sam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /