Bartłomiej Krztuk’s Post

View profile for Bartłomiej Krztuk, graphic

Head of Web Engineering at PandaDoc

How to turn your website loading from fast to instant? ⚡ With new Speculation Rules API you can achieve near-instant page load thanks to preloading next navigation page by providing predictive hints to the browser.   This new updated API is super flexible allow you to choose between prefetching or prerendering. A few remarks about this update:  👉 super flexible and easy to use 👉 currently supported in Chromium-based browsers (Chrome, Edge, and Opera) 👉 very easy to debug with native Dev Tools support  👉 have already native WordPress plugin available - Speculative Loading https://lnkd.in/dmqyfh52 As with great power comes great responsibility there is a couple of nitty-gritties you should be aware: - it's very easy to end with over-speculation that have bandwidth, memory, and CPU costs - heat maps seems to be best way to figure out what to prerender - preloading might affect your analytics, Google Analytics got that covered but be careful if you use any other system - while prefetching on mobile with moderate eagerness the event is triggered on pointerdown (when physical contact is made with the digitizer) Where to start? Barry Pollard did a great overview of all aspects of Speculation Rules API changes (https://lnkd.in/dPfsmpQ5). Once you implement it start with moderate / conservative eagerness and tweak it along the way. Enjoy! #webperf #webperformance

  • Photo by Nik on Unsplash
Lasse Schou Holbøll

Founder of Mouseflow, Soundvenue and PageVitals 🌿 SaaS maker, angel investor, wingfoiler 🏄♂️

6mo

Speculation Rules are just an easy way to drastically speed up your site. And thanks for mentioning heatmaps to help understand what to preload. Mouseflow has you covered 💪🏼

To view or add a comment, sign in

Explore topics