Guide de référence historique pour HTML5 Application Cache (manifest.appcache).
Obsolète et déprécié : Application Cache est retiré des spécifications web. Les applications modernes utilisent les Service Workers et l API Cache.
Syntaxe du manifeste AppCache
CACHE MANIFEST
# Version 2026-11-08
CACHE:
/index.html
/styles/main.css
/scripts/app.js
NETWORK:
/api/
*
FALLBACK:
/offline.html
API JavaScript (window.applicationCache)
const appCache = window.applicationCache;
appCache.addEventListener('updateready', () => {
if (appCache.status === appCache.UPDATEREADY) {
// Basculer le cache et recharger la page
appCache.swapCache();
window.location.reload();
}
});
// Forcer la vérification des mises à jour
appCache.update();