(no title)
mh-cx | 1 year ago
Few years ago I built a shopping site MPA this way and the page transitions were almost not noticable.
mh-cx | 1 year ago
Few years ago I built a shopping site MPA this way and the page transitions were almost not noticable.
palsecam|1 year ago
Stale-while-revalidate: see https://web.dev/articles/stale-while-revalidate & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...
Immutable: https://datatracker.ietf.org/doc/html/rfc8246 & https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...
And if using a CDN, `s-maxage` (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ca...) is quite useful. Set it to a long time, and purge the CDN cache on deploy.
exceptione|1 year ago
------------------
EDIT: appears that Chrome suddenly had decided in 2017 to not validate at all on reload anymore, after Facebook had complained to Chrome devs about Chrome being more a drag on their servers compared to other browsers.
jdsleppy|1 year ago
exceptione|1 year ago
wmfiv|1 year ago
mh-cx|1 year ago
youngtaff|1 year ago
Service Workers offer more controls over cache lifetime, and in Chromium (at least) JS gets stored in an intermediate form (which reduces the re-compile overhead on reuse)
thangngoc89|1 year ago
—— Original comment:
With browser cache, the browser stills need to send a HEAD request to see if the content was modified. These requests are noticeable when networks are spotty (train, weak mobile signals…)
Service Worker could cache the request and skip the head requests all together
cuu508|1 year ago
01HNNWZ0MV43FF|1 year ago
VoodooJuJu|1 year ago
Onavo|1 year ago
henriquegogo|1 year ago
leptons|1 year ago