Repository navigation
Conversation
Only Material Icons was preloaded, so the browser discovered Inter 400 and 600 once theme.css had been downloaded and parsed, one round trip after the stylesheet. Both are requested on the home, category and product pages (body text and headings), so they are now preloaded too. Only the Latin subset is matched; the other subsets and weights stay on demand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hello @MaximeBen! This is your first pull request on hummingbird repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
Progi1984
approved these changes
Nov 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
webpack-font-preload-pluginonly preloads Material Icons (filter: /(materialicons)/i). Inter is declared intheme.css, so the browser only discoversinter-latin-400-normalandinter-latin-600-normalonce that stylesheet has been downloaded and parsed: one full round trip after it. Both files are requested on the home, category and product pages (400 for the body text, 600 for$headings-font-weight), so the filter now matches them too andpreload.htmlgets two more<link rel="preload" as="font" crossorigin>.Only the Latin subset is matched (
inter-latin-(400|600)-normal):latin-ext, cyrillic, greek and vietnamese, and the 100/300/700 weights, stay on demand, as preloading a file a page does not use is a download for nothing. The two files are 23.7 KB and 24.5 KB (woff2). The preload URLs are the ones the stylesheet resolves (assets/fonts/…, same hashed names), with or without CCC, so nothing is downloaded twice.npm run build) and openassets/preload.html: it lists Material Icons, Inter Latin 400 and Inter Latin 600.On a page, the Network tab shows both Inter files requested together with Material Icons, before
theme.csshas finished, instead of after it, and the console has no "preloaded but not used" warning.Measured on PrestaShop 9.2 with demo data, mobile Lighthouse 12.8.2 (
--throttling-method=simulate, the PageSpeed default), 3 runs each, medians (min-max):- home: First Contentful Paint 1807 ms (1805-1809) -> 1356 ms (1354-1356), Speed Index 1902 -> 1867 ms, score 78 -> 79
- product page: First Contentful Paint 1656 ms (1655-1657) -> 1203 ms (1203-1203), Speed Index 1656 -> 1391 ms, score 86 -> 87
Largest Contentful Paint does not move: it is an image on both pages (the image slider on the home, the product cover on the product page). Each font is still downloaded once.
🤖 Generated with Claude Code