Skip to content

Commit c4a0e33

Browse files
committed
Add FAQ front matter to learn articles
1 parent 0d828b2 commit c4a0e33

13 files changed

Lines changed: 138 additions & 0 deletions

_layouts/post.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ <h1 itemprop="name headline" elementtiming=page-title style="view-transition-na
4747

4848
{{ content }}
4949

50+
{% if page.faq and page.faq.size > 0 %}
51+
52+
<hr>
53+
54+
<h2>Frequently Asked Questions</h2>
55+
56+
<div class="c-faq">
57+
{% for item in page.faq %}
58+
<details>
59+
<summary>{{ item.question }}</summary>
60+
<p>{{ item.answer }}</p>
61+
</details>
62+
{% endfor %}
63+
</div>
64+
{% endif %}
65+
5066
</div><!-- /.s-post -->
5167

5268
{% if page.faq %}

_posts/2018-11-09-css-and-network-performance.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ date: 2018-11-09 19:57:12
55
categories: Web Development
66
meta: "How can CSS impact network and resource-loading performance? Can things
77
be that serious?"
8+
faq:
9+
- question: "Can CSS affect network performance?"
10+
answer: "Yes. CSS can delay rendering, block later requests, and influence how quickly the browser discovers and prioritises other resources."
11+
- question: "Is @import bad for performance?"
12+
answer: "Usually, yes. @import often creates additional request chains and can delay stylesheet discovery, which is why external stylesheets linked directly in HTML are generally preferable."
13+
- question: "Should I inline critical CSS?"
14+
answer: "Inlining a small amount of critical CSS can help the browser render above-the-fold content sooner by avoiding an extra render-blocking stylesheet request."
15+
- question: "Where should I place my stylesheet links?"
16+
answer: "That depends on the constraints, but in general you want to avoid accidentally blocking more important work and you should place stylesheets deliberately rather than by habit."
817
---
918

1019
Despite having been called <cite>CSS Wizardry</cite> for over a decade now,

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ date: 2019-03-04 01:21:39
55
last_modified_at: 2025-06-05
66
categories: Web Development
77
meta: "What does Cache-Control really do? In basic terms? Let’s find out!"
8+
faq:
9+
- question: "What does Cache-Control do?"
10+
answer: "Cache-Control tells browsers and intermediary caches how a response should be stored, how long it can be reused for, and when it needs to be revalidated."
11+
- question: "What is the difference between no-store and no-cache?"
12+
answer: "no-store means do not store the response at all. no-cache still allows storage, but the cached response must be successfully revalidated before it can be reused."
13+
- question: "What does max-age mean?"
14+
answer: "max-age defines how long a response can be considered fresh. While it is fresh, the browser can usually reuse it without contacting the server."
15+
- question: "What is immutable used for?"
16+
answer: "immutable tells the browser that a fresh resource will not change during its cache lifetime, which helps avoid unnecessary revalidation on refresh."
17+
- question: "How should I update long-lived cached files?"
18+
answer: "The safest approach is cache busting with fingerprinted filenames, so you can cache assets aggressively while still forcing clients to fetch a new version when the file changes."
819
---
920

1021
## Why Caching Headers Still Matter for Web Performance in 2025

_posts/2019-08-08-time-to-first-byte-what-it-is-and-why-it-matters.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ title: "Time to First Byte: What It Is and How to Improve It"
44
date: 2019-08-08 02:06:56
55
categories: Web Development
66
meta: "Just how much does TTFB matter when it comes to front-end performance?"
7+
faq:
8+
- question: "What is Time to First Byte?"
9+
answer: "Time to First Byte measures how long it takes from making a request until the first byte of the response arrives back from the server."
10+
- question: "Why does TTFB matter?"
11+
answer: "TTFB matters because every downstream task depends on it. A slow first byte delays rendering, resource discovery, and other performance milestones."
12+
- question: "What causes a slow TTFB?"
13+
answer: "Slow TTFB can come from network latency, redirects, slow application logic, overloaded infrastructure, or cache misses closer to origin."
14+
- question: "How can I improve TTFB?"
15+
answer: "Common improvements include reducing server work, caching more effectively, cutting redirects, using a CDN, and bringing content physically closer to users."
716
---
817

918
I’m working on a client project at the moment and, as they’re an ecommerce site,

_posts/2020-05-19-the-fastest-google-fonts.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ date: 2020-05-19 17:35:04
55
categories: Web Development
66
main: "https://csswizardry.com/wp-content/uploads/2020/05/filmstrip-foit.png"
77
meta: "Google Fonts is fast. Now it’s faster. Much faster."
8+
faq:
9+
- question: "What is the fastest way to load Google Fonts?"
10+
answer: "It depends on the trade-offs you want, but strong options include reducing the number of files requested, using the right loading strategy, and adding supporting hints such as preconnect or preload where appropriate."
11+
- question: "Does font-display help Google Fonts performance?"
12+
answer: "Yes. font-display can improve perceived performance by controlling how text is shown while the font loads, with swap and optional being especially useful."
13+
- question: "Should I preload Google Fonts?"
14+
answer: "Sometimes. preload can speed up font discovery, but it needs to be used carefully because it can also add unnecessary work if applied indiscriminately."
15+
- question: "Is preconnect useful for Google Fonts?"
16+
answer: "Yes. preconnect can reduce the setup cost of talking to the Google Fonts origins, which often helps the fonts start downloading sooner."
817
---
918

1019
<div class="c-highlight mb">

_posts/2021-02-26-measuring-network-performance-in-mobile-safari.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ date: 2021-02-26 01:41:12
55
categories: Web Development
66
main: "https://res.cloudinary.com/csswizardry/image/fetch/f_auto,q_auto/https://csswizardry.com/wp-content/uploads/2021/02/inspecting-safari-02.png"
77
meta: "How often do you test your site in iOS Safari? Do you even know how?!"
8+
faq:
9+
- question: "How can I test web performance in iOS Safari?"
10+
answer: "A reliable approach is to use a real iPhone and inspect it through Safari’s developer tools on a Mac, or use WebPageTest where appropriate."
11+
- question: "Can I just emulate Mobile Safari?"
12+
answer: "Not fully. Emulation can be helpful, but it is not a complete substitute for testing on real iOS hardware and Safari itself."
13+
- question: "What do I need to debug an iPhone with Safari DevTools?"
14+
answer: "You need a Mac, an iPhone, Safari, and the relevant developer and Web Inspector settings enabled so the phone can be inspected remotely."
15+
- question: "Why is testing on iOS important?"
16+
answer: "Because iOS Safari behaves differently enough that issues with rendering, networking, or performance can go unnoticed if you only test in desktop browsers or Chrome."
817
---
918

1019
<p class="c-highlight"><strong>N.B.</strong> This article is no longer accurate,

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ date: 2022-03-28 23:02:11
55
categories: Web Development
66
main: "https://res.cloudinary.com/csswizardry/image/fetch/f_auto,q_auto/https://csswizardry.com/wp-content/uploads/2022/03/chart-full.png"
77
meta: "Let’s look at some more technical and non-obvious aspects of optimising Largest Contentful Paint"
8+
faq:
9+
- question: "What is Largest Contentful Paint?"
10+
answer: "Largest Contentful Paint is a Core Web Vitals metric that measures when the largest visible content element in the viewport finishes rendering."
11+
- question: "What usually improves LCP most?"
12+
answer: "The biggest wins usually come from improving server response times, choosing a good LCP candidate, and making sure the browser can discover and prioritise it quickly."
13+
- question: "Should I lazy-load my LCP image?"
14+
answer: "No. Lazy-loading your LCP candidate usually delays it and makes the metric worse."
15+
- question: "Can animations or fades hurt LCP?"
16+
answer: "Yes. Fade-ins and similar effects can delay when the browser considers the content fully rendered, which can worsen LCP."
17+
- question: "Are image-based LCPs always best?"
18+
answer: "Not necessarily. In many cases a text-based candidate is easier to prioritise and can produce a faster, more reliable LCP than a heavy image."
819
---
920

1021
<!--

_posts/2023-07-24-core-web-vitals-for-search-engine-optimisation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ date: 2023-07-24 00:00:00
55
categories: Web Development
66
main: "https://csswizardry.com/wp-content/uploads/2023/07/cwv-seo.png"
77
meta: "There’s still a lot of misunderstanding about CWV for SEO. Let’s work it out together."
8+
faq:
9+
- question: "Do Core Web Vitals affect SEO?"
10+
answer: "Yes, but only modestly. Core Web Vitals are a ranking signal, not the dominant factor, and they rarely outweigh stronger content or relevance."
11+
- question: "Are Core Web Vitals a tie-breaker?"
12+
answer: "That is the most practical way to think about them. They can help separate otherwise similar results, but they are not a substitute for strong content and search intent alignment."
13+
- question: "Do I need to pass Core Web Vitals on every page?"
14+
answer: "No. Rankings are assessed at the URL level, so some pages can fail without dragging every other page down with them."
15+
- question: "Do Lighthouse or PageSpeed Insights scores affect rankings?"
16+
answer: "No. Google’s rankings are based on real-world field data, not Lighthouse scores."
17+
- question: "Does iOS traffic count toward Core Web Vitals for SEO?"
18+
answer: "No. Core Web Vitals data used for Google Search comes from Chrome data sources, so Safari traffic is not included."
819
---
920

1021
## Updates

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ last_modified_at: 2025-09-05
66
categories: Web Development
77
main: "https://csswizardry.com/wp-content/uploads/2023/09/csswizardry.com-lcp.jpg"
88
meta: "Can Low-Quality Image Placeholders and LCP play nicely together?"
9+
faq:
10+
- question: "Can low-quality image placeholders hurt LCP?"
11+
answer: "Yes. If implemented badly, LQIPs can delay or interfere with the real Largest Contentful Paint candidate and make the metric worse."
12+
- question: "Can LQIPs and LCP work well together?"
13+
answer: "Yes. With the right approach, you can keep the UX benefits of a placeholder without compromising the final LCP result."
14+
- question: "Should I upscale an LQIP aggressively?"
15+
answer: "No. Over-upscaling a tiny placeholder can introduce a visible quality penalty and undermine the overall result."
16+
- question: "How small should an LQIP be?"
17+
answer: "The article recommends aiming for a sensible minimum quality threshold rather than making the placeholder as tiny as possible at any cost."
18+
- question: "How do I verify that an LQIP implementation works?"
19+
answer: "You should test the real page, confirm which element becomes the LCP candidate, and make sure the placeholder does not slow or replace the final intended image."
920
---
1021

1122
At the time of writing,

_posts/2023-10-17-the-three-c-concatenate-compress-cache.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ date: 2023-10-17 00:00:00
55
categories: Web Development
66
main: "https://csswizardry.com/wp-content/uploads/2023/10/chart-all.png"
77
meta: "We know we should do it, but do we know how?"
8+
faq:
9+
- question: "What are the three Cs of front-end performance?"
10+
answer: "They are concatenate, compress, and cache: three practical ways to reduce request overhead, transfer size, and repeat work."
11+
- question: "Do we still need concatenation with HTTP/2 or HTTP/3?"
12+
answer: "Not always, but not never either. Modern protocols reduce the need for blanket concatenation, yet there are still cases where fewer requests can be beneficial."
13+
- question: "Is compression still important on the modern web?"
14+
answer: "Absolutely. Compression remains one of the highest-return ways to reduce payload size and improve delivery speed."
15+
- question: "Why is caching one of the three Cs?"
16+
answer: "Because the fastest request is often the one you do not need to make again. Good caching eliminates repeat transfers and avoids unnecessary latency."
17+
- question: "Can we drop our build tools yet?"
18+
answer: "Sometimes, but not universally. The right answer depends on what your tooling is doing for concatenation, compression, caching, and overall delivery strategy."
819
---
920

1021
I began writing this article in early July 2023 but began to feel a little

0 commit comments

Comments
 (0)