Archive for the 'performance' Category

A quick WordPress Super Cache fix

Dec 7th, 2024

When you use a bog-standard WordPress install, the caching header in the HTML response is Cache-Control: max-age=600 OK, cool, this means cache the HTML for 10 minutes. Additionally these headers are sent: Date: Sat, 07 Dec 2024 05:20:02 GMT Expires: Sat, 07 Dec 2024 05:30:02 GMT These don’t help at all, because they instruct the […]

 

Inverse font subsetting

Nov 25th, 2024

While at the most recent performance.now() conference, I had a little chat with Andy Davies about fonts and he mentioned it’d be cool if, while subsetting, you can easily create a second subset file that contains all the “rejects”. All the characters that were not included in the initially desired subset. And as the flight […]

 

Web font sizes: a more complete data set

Nov 11th, 2024

This is part 4 of an ongoing study of web font file sizes, subsetting, and file sizes of the subsets. I used the collection of freely available web fonts that is Google Fonts. In part 1 I wondered How many bytes is “normal” for a web font by studying all regular fonts, meaning no bolds, […]

 

@supports and @font-face troubles

Nov 3rd, 2024

I’ve been crafting a nice font-face fallback, something like this: @font-face { font-family: fallback; src: local(‘Helvetica Neue’); ascent-override: 85%; descent-override: 19.5%; line-gap-override: 0%; size-adjust: 106.74%; } It works well, however Safari doesn’t yet support ascent-override, descent-override, nor line-gap-override in @font-face blocks. It does support size-adjust though. Since my code requires all 4, the results with […]

 

Web font file size study: a variable font addition

Oct 28th, 2024

TL;DR: If your variable font file is significantly larger than 35K you may ask yourself “How did I get here?” Two font files (of the same family) means more bytes than one variable font that does both For context see part 1 and part 2. After publishing part 2 of my ongoing web fonts file […]

 

The zebra jumps quickly over a fence, vexed by a lazy ox

Oct 21st, 2024

The zebra jumps quickly over a fence, vexed by a lazy ox. Eden tries to alter soft stone near it. Tall giants often need to rest, and open roads invite no pause. Some long lines appear there. In bright cold night, stars drift, and people watch them. A few near doors step out. Much light […]

 

Lessons learned from 222,557 font file subsets?

Oct 20th, 2024

Earlier this year I wondered how many KB is “normal” for a web font file size (spoiler 20-ish KB). I finished the post questioning how much subsetting really helps, meaning how much do you save from painstakingly choosing which characters should stay in the subset as opposed to just broad strokes (ASCII vs Latin vs […]

 

Font-face toggler bookmarklet v2

Oct 17th, 2024

This is a different version of a font on/off toggler bookmarklet. I did one such bookmarklet earlier this year, which works by messing up font-family inside @font-face. This new version works my messing up url() inside @font-face blocks. By “messing up” I mean changing the string “woff” to “woof” which means making the font files […]

 

Minimal SVG Favicon

Jun 15th, 2024

Why minimal? I like “minimum-viable”s of all sorts. As a performance enthusiast I’m fascinated by anything minimal. So here goes a minimum viable SVG favicon. Why favicon? Welp, browsers will look for one and if you don’t have it, enjoy the 404s! Why SVG? It could be tiny, almost as tiny as a CDN URL, […]

 

How many bytes is “normal” for a web font: a study using Google fonts

Jan 23rd, 2024

TL;DR: If your font file is significantly larger than 20K you may ask yourself “How did I get here?”. For images I think we (web developers) have a sense of how many bytes we can expect an image we see on a page to be. A JPEG photo? 100-ish K is ok for a decent […]

 

Font-face toggler bookmarklet

Jan 8th, 2024

Update: a different version that supports the use of local() is now available Ever wanted to look at your page and turn Web Fonts on and off? Experience the layout shift repeatedly, like some sort of UX torture? Look no further, here comes the handy bookmarklet. Install Drag this link to a bookmark toolbar near […]

 

Image requests in hidden content

Jan 1st, 2024

You know the pattern: spit out some markup, probably server-side, but hide it for later. On-demand features (not to overwhelm the UI), dialogs waiting to pop, and so on. <div class=”modal hidden”>content here…<div> And what happens when the “content here…” includes resources, such as images? Is the browser going to download them? Let’s check. What […]

 

Minimum viable no-image image src

Dec 26th, 2023

Remember spacer.gif? Yeah, “good” old days… We may now have all the CSS features to make everything better but sometimes the ghost of spacer gif rears its transparent head. And that’s an HTTP request. A request that’s better devoted to something useful. Like an LCP image or something, I dunno. So anyway, sometimes a simple […]

 

Perfplanet calendar ’23 call for articles

Nov 2nd, 2023

Hello, dear reader and web performance enthusiast! It’s time to sit down and write an article for the performance calendar. Here are some more details. Or if you’re not feeling like writing, look around you and recruit the person you think should share their knowledge with the world. What can you write about? Just share […]

 

A quick study of PDF optimization

Aug 17th, 2023

Couple days ago I found out about a tool called pdfcpu, a PDF processor. Among its features I saw “optimize” so I had to take it ot for a spin and see how much of an optimization we’re talking about. Here’s a quick study of optimizing a random-ish sample of PDF files. Source data I […]

 

Fixing INP with a VIEWPORT tag

Jul 12th, 2023

So I woke up yesterday being scolded by Google. An email from Google Search Console Team with subject “Core Web Vitals INP issues detected on your site”. Huh?! It was about this WordPress-powered site that you’re reading now (phpied.com). The Interaction to Next Paint metric (INP for short) was in the “Needs improvement” category as […]

 

A circle of web performance innovation

May 21st, 2023

Inspired by Harry Roberts’ research and work on ct.css and Vitaly Friedman’s Nordic.js 2022 presentation, Rick Viscomi hacked up a tool (a JS snippet) called capo.js that can do what Harry says. Next logical step is to test the results of the tool in a no-code experimental setting and see if the results make sense […]

 

Lighthouse diff + WebPageTest

May 9th, 2023

Lighthouse (LH), the performance auditing tool from Google now has a diff tool so you can compare what happens before/after a change or me vs competitor types. And WebPageTest.org (WPT), the industry-darling web perf analyzer, also runs Lighthouse and in addition to presenting the results (in two different ways, actually) you can export the results […]

 

Jehl’s Law of Web Performance

Apr 21st, 2023

Adam Fendrych reported that Scott Jehl said in his Web Expo talk that a website should load before you can say “Cumulative Layout Shift”. What does that mean in practice? We’re web performance specialists here, we work with measurements and numbers, so we need a more exact number. Numbers reduce ambiguity. To find out that […]

 

Quick BPP (image entropy) check

Apr 13th, 2023

Chrome is making a change on how Largest Contentful Paint (LCP) core web vital (CWV) is being calculated in order to avoid abuse. The abuse is that people cheat by putting a fake “hero” image (imagine a stretched out 1×1 transparent gif) and have this counted as a sooner LCP event. Chrome is fighting this […]

 

Faster WordPress rendering with 3 lines of configuration

Jul 2nd, 2022

“When I was younger, so much younger than today” and upset and full of vinegar about the state of the world, I’d say things like “CSS is the worst” (not really). Now, half a year later, older and wiser and more accepting, I’d agree to mellow down to “CSS is render-blocking”. Un-render-blocking CSS What this […]

 

Perfplanet calendar ’21 call for articles

Nov 26th, 2021

Helloooo, dear reader and web performance enthusiast! It’s time to sit down and write an article for the performance calendar. Here are some more details. Or if you’re not feeling like writing, look around you and recruit the person you think should share their knowledge with the world. What do you want to write about? […]

 

Perfplanet calendar’s oldies but goodies

Nov 3rd, 2021

Thomas Steiner has a brilliant idea for this year’s Perfplanet calendar edition: what if we revisit some of the best articles from the past. “Best” is subjective but how about “still popular”? So here’s a list of the 31 most visited articles in the past year in reverse chronological order of publication. (31 as the […]

 

This page loaded in X seconds

Mar 27th, 2018

I was just admiring Tim Kadlec eye-pleasing site. Nice, simple, see what I’m talkin’ ’bout. The feature I liked most was the footer that said “This page loaded in 0.186 seconds”. First of all – fast! Second – I thought all sites should have that. And what better way than an on-demand bookmarklet you carry […]

 

Performance calendar ’17 call to all

Nov 11th, 2017

Helloooo! It’s time to sit down and write an article for the performance calendar. You have until Nov 30 to send me your piece. Details. What do you want to write about? Some ideas: Hello, 2007 called! Do I still shard domains to load resources from? Do I still package all JS in one big […]