Xzensi / NipahTV

✨ NipahTV - A Better Kick and 7TV Emote Extension for Kick ✨
https://nipahtv.com
4 stars 2 forks source link

Locally cache emote images for faster load times and reduced load on CDN servers #171

Open Xzensi opened 2 weeks ago

cmd430 commented 2 weeks ago

I don't think you need to do anything for/about this, browser will only request the emote once for the session then use cache for additional requests of the same emote image as shown here image

ETA: I don't personally use Nipah (I have my own private tweak) but this should be true for Nipah unless you are doing something to invalidate the URLs for emotes (by adding query params for example)

Xzensi commented 2 weeks ago

I don't think you need to do anything for/about this, browser will only request the emote once for the session then use cache for additional requests of the same emote image as shown here image

ETA: I don't personally use Nipah (I have my own private tweak) but this should be true for Nipah unless you are doing something to invalidate the URLs for emotes (by adding query params for example)

That's certainly true, however on every browser reload it'll have discarded this cache. I can make emote loading nearly instant and at same time further reduce load on CDN's by caching it in CacheStorage as well. The reason for the not-low P2 priority is because I noticed quite a few 7TV CDN degraded service issues with people reporting that 7TV emotes weren't loading, or loading uncomfortably slow. This would at least make it more reliable and stable for when 7TV does have degraded service issues due to high load.

But thinking of lowering priority and focus on other things instead.