Simon Willison’s Weblog

Subscribe

Friday, 29th January 2021

Making GitHub’s new homepage fast and performant. A couple of really clever tricks in this article by Tobias Ahlin. The first is using IntersectionObserver in conjunction with the video preload=“none” attribute to lazily load a video when it scrolls into view. The second is an ingenious trick to create an efficiently encoded transparent JPEG image: embed the image in a SVG file twice, once as the image and once as a transparency mask.

# 7:05 pm / images, performance, svg, javascript, github

2021 » January

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031