Snelle referentie

HTML5 Application Cache Spiekbrief (Archief)

Historische handleiding voor HTML5 AppCache: manifest-syntaxis, cache-events, updatecontrole en Service Worker-migratie.

· Gepubliceerd

Een historische referentiehandleiding voor HTML5 Application Cache (manifest.appcache).

Verouderd & Buiten gebruik: Application Cache is verwijderd uit de webstandaarden. Moderne webapps gebruiken Service Workers en de Cache API voor offline caching.

AppCache Manifest-syntaxis

CACHE MANIFEST
# Version 2026-11-08

CACHE:
/index.html
/styles/main.css
/scripts/app.js

NETWORK:
/api/
*

FALLBACK:
/offline.html

JavaScript-API (window.applicationCache)

const appCache = window.applicationCache;

appCache.addEventListener('updateready', () => {
  if (appCache.status === appCache.UPDATEREADY) {
    // Wissel cache en herlaad pagina
    appCache.swapCache();
    window.location.reload();
  }
});

// Forceer updatecontrole
appCache.update();

Referenties

Verwante onderwerpen