4 ms·
I work on a community forum platform and we detect YouTube embeds and replace them proxied thumbnails that don’t load until clicked. Just because one person in
by charrondev 2y ago
I work on a community forum platform and we detect YouTube embeds and replace them proxied thumbnails that don’t load until clicked.
Just because one person in a thread shares a YouTube video doesn’t mean everyone else loading that page should have to download 1MB+ of YouTube’s JavaScript bloat and have their IPs tracked by google.
- mindhunter 2y agoDo you also cache or proxy the thumbnail? Google can also track them when hotlinking it.
- tczMUFlmoNk 2y agoGP says "proxied thumbnails", so it sounds like yes.
- pier25 2y agoIs there a similar solution for SoundCloud? Their player is also super bloated.
- diggan 2y agoYou can basically do this with any embeds (granted they don't do a lot of global fuckery, which is a lot of them). Make sure the embed code gets evaluated within a function, then call that function when the user clicks on your "proxy" image. You might have to do a replace of the DOM elements as well, so the embed code gets what its expecting.
- paulirish 2y agoThere are a few "facade" solutions listed at https://developer.chrome.com/docs/lighthouse/performance/third-party-facades https://developer.chrome.com/docs/lighthouse/performance/thi... But.. AFAIK nobody has made one for Soundcloud.
- btouellette 2y agoI've got a site that is basically infinite scroll of mostly YouTube, SoundCloud, and Reddit embeds and had to do this for YouTube for it to even be functional. Using the YouTube provided thumbnails though since I'm not too concerned about tracking.
- BodyCulture 2y agoPlease more respect for your users, as should be appropriate for a webmaster. If you personally do not mind tracking, OK, but please do respect that a visitor of your website might have different opinions. Thank you!
- wbobeirne 2y agoUsers are also capable of blocking traffic from their client if that's something they care about.
- griftrejection 2y ago[flagged]
- deleted 2y ago[deleted]
- kordlessagain 2y ago[flagged]
- asimops 2y agoThis is not something they should have to care about. And once you leave the tech savvy community then can not take care of it via content-blockers... You should do the correct thing by default, which is not supporting adtechs' psychological warfare agains the population imho.
- scrivna 2y agoIt sounds like the users visiting this site are there to watch YouTube videos
- ttymck 2y agoAny tips or examples you are able to point for on this solution? I am coincidentally working on this exact problem at the moment.
- bfelbo 2y agoYes! @OP, would love to hear more on how you’ve done this.