Skip to content

Commit d422475

Browse files
committed
Add cross sells to posts
1 parent eba3cd4 commit d422475

6 files changed

+36
-0
lines changed

_posts/2019-03-04-cache-control-for-civilians.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ a fresher response), but if the server responds favourably, the network transfer
159159
is only a file’s headers: the body can be grabbed from cache rather than
160160
redownloaded.
161161

162+
{% include cross-sell.html %}
163+
162164
So, like I say, this is a smart way to combine freshness and the possibility of
163165
getting a file from cache, but it will hit the network for at least an HTTP
164166
header response.
@@ -321,6 +323,8 @@ served.
321323

322324
## `no-transform`
323325

326+
{% include cross-sell.html %}
327+
324328
`no-transform` doesn’t have anything do with storing, serving, or revalidating
325329
freshness, but it does instruct intermediaries that they cannot modify, or
326330
_transform_, any of the response.
@@ -420,6 +424,8 @@ that release. This is potentially wasteful, so prefer options (1) or (2).
420424

421425
### `Clear-Site-Data`
422426

427+
{% include cross-sell.html %}
428+
423429
Cache invalidation is hard—[famously
424430
so](https://martinfowler.com/bliki/TwoHardThings.html)—so there’s [a spec
425431
currently underway](https://www.w3.org/TR/clear-site-data/) that helps
@@ -469,6 +475,8 @@ Request URL: /account/
469475
Cache-Control: no-store
470476
```
471477

478+
{% include cross-sell.html %}
479+
472480
As per the spec, this would be sufficient to prevent a browser persisting the
473481
response to disk at all, across private and shared caches:
474482

_posts/2022-03-28-optimising-largest-contentful-paint.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ not limited to):
5555
* First Paint
5656
* First Contentful Paint
5757

58+
{% include cross-sell.html %}
59+
5860
If any of these are slow, you’re already on the back foot, and they’re going to
5961
have a knock-on effect on your LCP. The metrics above don’t matter in and of
6062
themselves, but it’s going to help your LCP if you can get them as low as
@@ -163,6 +165,8 @@ The initial demos can be found at:
163165
<div style="background-image: url(lcp.jpg)">...</div>
164166
```
165167

168+
{% include cross-sell.html %}
169+
166170
[The WebPageTest
167171
comparison](https://webpagetest.org/video/compare.php?tests=%2C220320_BiDc0C_6AJ%2C220320_BiDcJT_6AP%2C220320_BiDcN0_6AM%2C220320_BiDc56_6AK&thumbSize=200&ival=100&end=full)
168172
is available for you to look through, though we’ll pick apart individual
@@ -239,6 +243,8 @@ degraded LCP scores for your site.
239243
<figcaption>This bug is fixed in Chrome 102.</figcaption>
240244
</figure>
241245

246+
{% include cross-sell.html %}
247+
242248
Because of the current reporting bug, `<image>` in `<svg>` is likely to go from
243249
being (inadvertently) one of the fastest LCP types, to one of the slowest. In
244250
the unlikely event that you are using `<image>` in `<svg>`, it’s probably
@@ -313,6 +319,8 @@ which is far too late. We don’t like `background-image` LCPs.
313319

314320
#### Getting Around `background-image` Issues
315321

322+
{% include cross-sell.html %}
323+
316324
If you currently have a site whose LCP is a `background-image`, you might be
317325
thinking of refactoring or rebuilding that component right now. But, happily,
318326
there’s a very quick workaround that requires almost zero effort: let’s
@@ -356,6 +364,8 @@ In summary:
356364

357365
## Don’t Shoot Yourself in the Foot
358366

367+
{% include cross-sell.html %}
368+
359369
Alright! Now we know which are the best candidates, is there anything else can
360370
do (or avoid doing) to make sure we aren’t running slowly? It turns out there
361371
are plenty of things that folks do which inadvertently hold back LCP scores.

_posts/2023-09-28-the-ultimate-lqip-lcp-technique.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ The first takeaway is: **don’t upscale your LQIP**.
185185

186186
### Calculating the Upscaling Penalty
187187

188+
{% include cross-sell.html %}
189+
188190
Let’s get a bit more detailed about upscaling and penalties. Some [close reading
189191
of the spec](https://www.w3.org/TR/largest-contentful-paint/#sec-add-lcp-entry)
190192
tells us exactly how this works. It’s not the easiest thing to digest, but I’ll
@@ -277,6 +279,8 @@ order to register a fast LCP time:
277279
> displayed.
278280
> [Largest Contentful Paint change in Chrome 112 to ignore low-entropy images](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/speed/metrics_changelog/2023_04_lcp.md)
279281
282+
{% include cross-sell.html %}
283+
280284
This one is much simpler to make sense of. In order for an image to be counted
281285
as an LCP candidate, it needs to contain at least 0.05 bits of data per pixel
282286
displayed.
@@ -407,6 +411,8 @@ size)</a></figcaption>
407411

408412
## Implementing Low-Quality Image Placeholders
409413

414+
{% include cross-sell.html %}
415+
410416
My implementation becomes incredibly simple as I’m using a background image.
411417
This means I can simply layer up the progressively higher-resolution files using
412418
CSS’ multiple backgrounds:

_posts/2023-10-16-what-is-the-maximum-max-age.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ a `max-age` that equates to forever?
4444

4545
## `immutable`
4646

47+
{% include cross-sell.html %}
48+
4749
If we’re confident that we can cache a file for a year, we must be also quite
4850
confident that it never _really_ changes. After all, a year is a very long time
4951
in internet timescales. If we have this degree of confidence that a file won’t
@@ -121,6 +123,8 @@ It turns out there is a maximum value for `max-age`, and it’s defined in [RFC
121123
> the cache **MUST** consider the value to be 2147483648 (2<sup>31</sup>) or the
122124
> greatest positive integer it can conveniently represent.
123125
126+
{% include cross-sell.html %}
127+
124128
The spec says caches should accept a maximum `max-age` value of
125129
whatever-it’s-been-told, falling back to 2,147,483,648 seconds (which is 68
126130
years), or failing that, falling back to as-long-as-it-possibly-can. This

_posts/2024-12-02-a-layered-approach-to-speculation-rules.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ In this scenario, I am explicitly prerendering named and known URLs, with
7575
a loose idea of a potential and likely user journey—I’m warming up what I think
7676
might be the visitor’s next page.
7777

78+
{% include cross-sell.html %}
79+
7880
While these are both functional and beneficial, I wanted to do more. My site,
7981
although not very obviously, has two sides to it: the blog, for folk like you,
8082
and the commercial aspect, for [potential clients](/services/). While steering
@@ -432,6 +434,8 @@ We could apply these against this example page:
432434
</footer>
433435
```
434436

437+
{% include cross-sell.html %}
438+
435439
* Top-level navigation items with `data-prefetch=prerender` (e.g. the _About_
436440
page) are immediately prerendered.
437441
* Sub-level navigation items with `data-prefetch` (e.g. the _Solutions_ page)

_posts/2024-12-04-licensing-code-on-css-wizardry.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Over the years, conscientious developers and organisations have occasionally
2929
reached out to ask if they can use my code in commercial settings. My answer has
3030
always been an informal _yes!_
3131

32+
{% include cross-sell.html %}
33+
3234
However, I feel it’s time to provide more structure and clarity. From now on,
3335
everything shared on `csswizardry.com`—unless stated otherwise—is covered by the
3436
MIT License.
@@ -50,6 +52,8 @@ purposes.
5052
At the same time, it protects me by absolving any liability for how the content
5153
is used. It’s a win-win.
5254

55+
{% include cross-sell.html %}
56+
5357
The MIT License is already a familiar standard in the open-source world, so the
5458
chances are you or your company have used work under this license before. It’s
5559
simple, clear, and works perfectly for my goals.

0 commit comments

Comments
 (0)