HTTP caching ngidini browser lan CDN nganggo maneh respons tinimbang njupuk maneh, dikontrol dening header Cache-Control. Pola sing menang kanggo aplikasi web: hash jeneng file aset sampeyan lan cache selawase; jaga HTML supaya ora bisa di-cache.
Strategi rong tingkat
http
# Hashed, versioned assets — content never changes for a given URL
Cache-Control: public, max-age=31536000, immutable
# e.g. /static/app.9f2c1a.js (the hash changes when content changes)
# HTML — must always be fresh so it can point at new asset hashes
Cache-Control: no-cache
