v6.7.3: faster loading, and pages search engines can read
The bundles carried all thirteen translations at once and a page fetched them a third time as raw source; each page now loads only its own language. Alongside that: JavaScript is minified, the eight stylesheets are served as one file, the QR scanner is fetched after the app is up instead of on every visit, Inter ships once rather than five copies of the same file, and Font Awesome is subset to the 82 icons this app draws instead of all 2468. 1.85 MB across 43 requests becomes under 700 KB across 33. On mobile the page starts drawing in 1.6 s instead of 6.3 s and is usable in 4.5 s instead of 11 s. Pages also carry their text in the HTML now. Everything was drawn by JavaScript into an empty div, so crawlers saw correct metadata around nothing, and twelve of the thirteen language pages had never been shown to anyone. The documentation is published under /docs/ with a new FAQ, and unknown addresses return a real 404. Separately: the localized shells were served with the year-long immutable cache header meant for static assets, which pinned anyone who opened /de/ or /ru/ to that build. The header is fixed and the service worker refreshes what it cached. Claude-Session: https://claude.ai/code/session_014KjzTXxrhzYoDDWChYQ4u2
This commit is contained in:
@@ -4,12 +4,14 @@
|
||||
// within the page CSP (script-src 'self', style-src 'self' 'unsafe-inline').
|
||||
//
|
||||
// Deferred here (decorative / non-layout, not needed for the initial paint):
|
||||
// - FontAwesome (~102KB): icon glyphs. Their webfonts are still <link rel=preload>ed
|
||||
// in index.html, so they download in parallel and apply as soon as this CSS lands.
|
||||
// - Prism (tiny): syntax-highlighting theme, only used inside code blocks in chat.
|
||||
//
|
||||
// FontAwesome used to be the reason this file existed: 102 KB of stylesheet for 2468
|
||||
// icons, of which the interface draws 82. Subset to those, it is 7 KB and rides in the
|
||||
// main bundle instead, so the icons are styled from the first paint rather than a beat
|
||||
// after it. See scripts/subset-icons.py.
|
||||
(function () {
|
||||
var sheets = [
|
||||
'/assets/fontawesome/css/all.min.css',
|
||||
'/libs/prism/prism.css'
|
||||
];
|
||||
for (var i = 0; i < sheets.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user