0

I am starting to work with offline webapps.

I made a cache manifest for a test site but i cant get it to work.

I trying that when offline it redirect from index.html to offline.html but it just download index.html and shows it.

This is my cache manifest:

CACHE MANIFEST

FALLBACK:
./ ./offline.html

Inside index.html there is just one line:

Hello this is a test, you are online

This is offline.html

<html manifest='cmanifest'>
<head></head>
<body>you are offline now</body>
</html>

UPDATE

Now I have this problem:

I add a link that should go to one site when online and another when offline, but it just loads online.html all the time.

My index.html is like this now:

<html>
<a href='online.html'>Ir a online.html</a>
</html>

And my cache is like this:

CACHE MANIFEST

#v2

FALLBACK:
./online ./offline.html

NETWORK:
*
leojg
  • 1,156
  • 3
  • 16
  • 40

1 Answers1

0

Ok, I found the solution myself.

I had this line missing:

NETWORK:
*
leojg
  • 1,156
  • 3
  • 16
  • 40