Fichier manifest et cache
Bonjour,
J'ai une application que je veux distribuer avec un fichier manifest
Code:
1 2
| <!DOCTYPE html>
<html lang="fr" manifest="aplal.appcache"> |
Sur mon serveur local 127.0.0.1, ça marche très bien.
Quand je la mets sur mon serveur d'hébergement, l'application est bien accessible en offline, mais quand je mets à jour le fichier manifest, elle ne se met pas à jour.
Code:
1 2 3 4 5
|
cache.addEventListener("updateready",function(evt){
alert("updateready => status : "+cache.status);
cache.swapCache();
}); |
Pourtant updateready est bien déclenché ! Et donc swapCache() appelé ici, ie que la page détecte bien un changement de version du fichier manifest !
Je suis sur un serveur hébergé. Est-ce qu'il y a un problème de virtual Host ? Je ne maîtrise pas trop...
Quelqu'un a une idée ?
Merci à vous
contenu du fichier manifest
Bon, c'est juste la grosse liste de tous les fichiers de l'application..
Il n'y a pas de ressources externes ni de fallback...
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
| CACHE MANIFEST
# Version 201601-MAJ:19/02/2016 - V1
###################
# dossier principal
###################
aplal.html
preview.html
favicon.ico
###############
# dossier css
###############
css/normalize.css
css/jquery-ui.min.css
css/jquery.ui.labeledslider.css
css/sopera.css
css/questionnary.css
css/aplal.mustache-templates.css
css/aplal.css
css/custom.css
css/images/ui-icons_454545_256x240.png
css/images/ui-icons_888888_256x240.png
#############
# dossier img
#############
img/arrow-down32.svg
img/arrow-left32.svg
img/arrow-right32.svg
img/arrow-up32.svg
img/book.svg
img/calculator.svg
img/calendar16.png
img/download.svg
img/file-empty.svg
img/file-text.svg
img/floppy-disk-inactive.svg
img/floppy-disk.svg
img/folder-open.svg
img/gear.svg
img/gear16.png
img/gear16b.png
img/graph.svg
img/home16.png
img/home16b.png
img/info.svg
img/info32.png
img/info48.png
img/logoush.png
img/multigear.svg
img/no16.png
img/no32.png
img/printer.svg
img/question16.png
img/question32.png
img/undo.svg
img/undolx.svg
img/undolz.svg
img/undorz.svg
img/warning32.png
img/wrench.svg
img/xbody16b.png
img/zoom-in.svg
img/zoom-out.svg
##############
# dossier help
##############
help/ap.css
help/ap.html
help/ap.js
help/ap_body.js
help/calcul_de_al_accession.html
help/calcul_de_apl_accession.html
help/calcul_de_apl_al_locative.html
help/charges_locatives.html
help/colocataire.html
help/definition_des_zones_geographiques.html
help/edition_de_tableaux.html
help/larrow.ico
help/le_calcul_automatique.html
help/loyer.html
help/mensualite_prise_en_compte.html
help/personne_a_charge.html
help/personne_seule_avec_personne_a_charge.html
help/print16.gif
help/printpreview16.gif
help/rarrow.ico
help/remboursement_dette_sociale.html
#############
# dossier js
#############
js/aplal.data.min.js
js/aplal.editions.min.js
js/aplal.go.min.js
js/aplal.json.min.js
js/aplal.min.js
#js/aplal.mustache-templates.html
js/Blob.min.js
js/d3.min.js
js/d3.tip.min.js
js/FileSaver.min.js
js/ICanHaz-no-mustache.min.js
js/jquery-ui-1.11.2.custom.min.js
js/jquery.json.min.js
js/jquery.min.js
js/jquery.ui.datepicker-fr.min.js
js/jquery.ui.labeledslider.min.js
js/mustache.min.js
js/sopera.min.js
#js/sopera.mustache-templates.html
#js/sopera.mustache-templates.loader.min.js
js/sopera.plot3d.min.js
js/sopera.svg.min.js
js/store.min.js |
Ensuite, j'utilise
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
var cache=window.applicationCache;
//cache.addEventListener("checking",function(evt){
// alert("checking => status : "+cache.status);
//});
//cache.addEventListener("noupdate",function(evt){
// alert("noupdate => status : "+cache.status);
//});
cache.addEventListener("updateready",function(){
//alert("updateready => status : "+cache.status);
if (cache.status==cache.UPDATEREADY) {
//alert("Mise à jour disponible");
//so.msgbox("Mise à jour de l'application");
cache.swapCache();
//window.location.reload();
}
},false); |
Comme je le disais, updateready est bien déclenché quand il y a modification du fichier manifest !
(le message Mise à jour disponible s'affiche).
Là, je ne vois pas...