
Problema con el manifiesto
Publicado por VictorDevelop (23 intervenciones) el 19/08/2018 12:11:57
Buenas tardes.
Al cargar esta pagina:
Me aparece por una parte un warning con este texto:
Ignoring out of scope FALLBACK entries of the application cache manifest because the content-type is not text/cache-manifest
Y este el manifiesto:
CACHE MANIFEST
#2018-08-15:v1
CACHE:
/favicon.ico
index.php
stylesheets.css
js/script.js
#Resources that require the user to be online
NETWORK:
index.php
/myapi
http://api.twitter.com
FALLBACK:
#offline will be displayed if the user is offline
/ /offline.html
/main.py /index.php
*.html /offline.html
online.js offline.js
Y por otra parte un fallo un 404 por que no encuentra la pagina y la pagina existe
Alguna idea?
Gracias de antemano,saludos.
Al cargar esta pagina:
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
<html manifest="appcache" content>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1 >Status Cache</h1>
<button id="valueStatus" onclick="cacheStatus()">Status Cache</button>
<?php
// put your code here
?>
</body>
</html>
<script type="text/javascript">
var appCache = window.applicationCache;
function cacheStatus(){
switch (appCache.status)
{ case "UNCACHED":
appCache.status='UNCACHED'; break;
case appCache.IDLE: // IDLE == 1
appCache.status='IDLE'; break;
case appCache.CHECKING: // CHECKING == 2
appCache.status= 'CHECKING'; break;
case appCache.DOWNLOADING: // DOWNLOADING == 3
appCache.status= 'DOWNLOADING'; break;
case appCache.UPDATEREADY: // UPDATEREADY == 4
appCache.status= 'UPDATEREADY'; break;
case appCache.OBSOLETE: // OBSOLETE == 5
appCache.status= 'OBSOLETE'; break;
default: appCache.status='UKNOWN CACHE STATUS'; break; };
return appCache.status;
}
if(cacheStatus()==0 || cacheStatus()==null){
document.getElementById("valueStatus").innerHTML="Sin Cambios";
}else{
document.getElementById("valueStatus").innerHTML=cacheStatus();
}
//De esta forma se le permite al usuario actualizar a la version mas reciente,si es que lo desea
window.addEventListener('load',function(e)
{
window.applicationCache.addEventListener('updateready',function (e)
{
if(window.applicationCache.status==window.applicationCache.UPDATEREADY)
{
//Broswer downloaded new app cache
//Swap it in and reload the page to get the new cache
window.applicationCache.swapCache();
if(confirm("A new version is available,Load it?"))
{
window.location.reload();
}
}else{
alert("Without changes in manifiest");
//The manifiest didn't changed.Nothing new to server
}
},false);
},false);
function handleCacheEvent(){}
function handleCacheError(e){
alert("Error: Fallo al descargar la cache");
}
//Ejecutado despues del primer cacheado del manifiesto
appCache.addEventListener('cached',handleCacheEvent(),false);
//Buscando una actualizacion.Este evento es el primero que se dispara en la secuencia
//checking for a update .Always the first event fired in the sequence
appCache.addEventListener('checking',handleCacheEvent(),false);
//An update was found.The browser is fetching resources
//Una actualizacion fue encontrada.El v¡navegador esta estrayendo los recursos
appCache.addEventListener('downloading',handleCacheEvent(),false);
//Fired if The manifiest return a 404 or 410.
//This results in the aplication cache being deleted
appCache.addEventListener('obsolete',handleCacheEvent(),false);
//Fired for each resource listed in the manifiest as it is being fetched
appCache.addEventListener('progress',handleCacheEvent(),false);
//Fired when the manifiest resources have been newly redownloaded
appCache.addEventListener('updateready',handleCacheEvent(),false);
</script>
<script src="js/TestOnline.js" type="text/javascript"></script>
Me aparece por una parte un warning con este texto:
Ignoring out of scope FALLBACK entries of the application cache manifest because the content-type is not text/cache-manifest
Y este el manifiesto:
CACHE MANIFEST
#2018-08-15:v1
CACHE:
/favicon.ico
index.php
stylesheets.css
js/script.js
#Resources that require the user to be online
NETWORK:
index.php
/myapi
http://api.twitter.com
FALLBACK:
#offline will be displayed if the user is offline
/ /offline.html
/main.py /index.php
*.html /offline.html
online.js offline.js
Y por otra parte un fallo un 404 por que no encuentra la pagina y la pagina existe
Alguna idea?
Gracias de antemano,saludos.
Valora esta pregunta


0