web performance optimization Remove dust from a legacy project Years go by, platform code grows, browser platform support changes, and there you are: +300 Kilobytes of minified JavaScript code is shipped, same in CSS and the Chrome Code Coverage Tool shouts a
frontend WebP image and background usage in web projects With Firefox 65 joining the WebP party and thanks to the incredible squoosh app, WebP becomes more than just a lighthouse proposal. So it is time to figure out how to use WebP
plain js javascript - choosing the right timeout is easy Every once in awhile I see code that debounces expensive events like resize or scroll: someTimeout = window.setTimeout(debounceScroll, 10); and I wonder about the magic numbers, developers choose. magic numbers In the
javascript mobile optimised html5 background video handler In April 2016 I was developing a website with heavy use of background videos. There were many sections, all with their own full-screen background video starting playback on viewport visibility and stopping it
js jquery event delegation in plain js When you add an event handler, do you delegate it? Thanks to jQuery, I do. jQuery 1.3 shipped a function called .live() with which you could add event handlers for elements, that